diff --git a/LibOneM2M/OneM2M_Functions.ttcn b/LibOneM2M/OneM2M_Functions.ttcn index b5d0cc3f1554f8eb0f5229405cb38f7864112044..ff625e365f2077aa4118b79841ce2b751f5d2f07 100644 --- a/LibOneM2M/OneM2M_Functions.ttcn +++ b/LibOneM2M/OneM2M_Functions.ttcn @@ -1400,7 +1400,7 @@ module OneM2M_Functions { * @verdict */ function f_cse_preamble_subscriptionVerification(inout integer p_ae2Index, inout template RequestPrimitive p_createRequestPrimitive,in ResourceType p_resourceType, in ResponseStatusCode p_responseStatusCode := int2000) runs on AeSimu { - if(p_resourceType == int23){ + if((p_resourceType == int23) or (p_resourceType == int48)){ vc_ae2.start(f_cse_createAccessControlPolicyAux("SubscriptionVerificationAcp",{"all"}, int63)); f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); @@ -1412,6 +1412,9 @@ module OneM2M_Functions { if(ischosen(p_createRequestPrimitive.primitiveContent.subscription)){ //this condition is necessary for Subscription TCs where notification URI is set in m_createSubscriptionAdvanced p_createRequestPrimitive.primitiveContent.subscription.notificationURI := {f_getResourceAddress(p_ae2Index)}; } + if(ischosen(p_createRequestPrimitive.primitiveContent.crossResourceSubscription)){ + p_createRequestPrimitive.primitiveContent.crossResourceSubscription.notificationURI := {f_getResourceAddress(p_ae2Index)}; + } vc_ae2.start(f_cse_notifyProcedure_subscriptionVerificationHandler(p_responseStatusCode)); } } @@ -2269,9 +2272,15 @@ module OneM2M_Functions { tc_ac.start; repeat; } - [] mcaPortIn.receive{ + [] mcaPortIn.receive(mw_request(mw_notifyNotification(mw_contentNotificationBase))) -> value vc_request { tc_ac.stop; - setverdict(inconc, __SCOPE__ & ":ERROR: unexpected message received"); + + setverdict(pass, __SCOPE__ & ":INFO: Notification received"); + + //Send response in any case + v_responsePrimitive := valueof(m_responseNotification(int2000, omit)); + v_responsePrimitive.requestIdentifier := vc_request.primitive.requestPrimitive.requestIdentifier; + f_send(e_mcaPortIn, m_response(v_responsePrimitive)); tc_ac.start; repeat; } diff --git a/LibOneM2M/OneM2M_Templates.ttcn b/LibOneM2M/OneM2M_Templates.ttcn index 01de67d7f01bcbf24be6ee128dc81bd188a0bcb7..88cf6c1b9a7a06b30ef4c4bc889432347079583f 100644 --- a/LibOneM2M/OneM2M_Templates.ttcn +++ b/LibOneM2M/OneM2M_Templates.ttcn @@ -166,6 +166,7 @@ module OneM2M_Templates { filterOperation := omit, contentFilterSyntax := omit, contentFilterQuery := omit, + geoQuery := omit, level := omit, offset := omit, applyRelativePath := omit @@ -329,6 +330,7 @@ module OneM2M_Templates { filterOperation := omit, contentFilterSyntax := omit, contentFilterQuery := omit, + geoQuery := omit, level := omit, offset := omit, applyRelativePath := omit @@ -383,6 +385,7 @@ module OneM2M_Templates { filterOperation := omit, contentFilterSyntax := omit, contentFilterQuery := omit, + geoQuery := omit, level := omit, offset := omit, applyRelativePath := omit @@ -424,6 +427,7 @@ module OneM2M_Templates { filterOperation := omit, contentFilterSyntax := omit, contentFilterQuery := omit, + geoQuery := omit, level := omit, offset := omit, applyRelativePath := omit @@ -467,6 +471,7 @@ module OneM2M_Templates { filterOperation := omit, contentFilterSyntax := omit, contentFilterQuery := omit, + geoQuery := omit, level := omit, offset := omit, applyRelativePath := omit @@ -514,6 +519,7 @@ module OneM2M_Templates { filterOperation := omit, contentFilterSyntax := omit, contentFilterQuery := omit, + geoQuery := omit, level := omit, offset := omit, applyRelativePath := omit @@ -2052,6 +2058,23 @@ module OneM2M_Templates { primitiveContent := {dynamicAuthorizationConsultation := m_contentCreateContainerAnnc} };*/ + /** + * @desc Base CREATE request primitive for crossResourceSubscription resource + */ + /*template (value) RequestPrimitive m_createCrossResourceSubscriptionBase modifies m_create := { + requestIdentifier := testcasename() & "-m_createCrossResourceSubscription", + resourceType := int48, + primitiveContent := {crossResourceSubscription := m_contentCreateCrossResourceSubscription ({"NotInitialized"}, -, -, omit)} + };*/ + + template (value) RequestPrimitive m_createCrossResourceSubscription(XSD.ID p_parentResourceAddress, in template (omit) XSD.String p_name := c_defaultSubscriptionResourceName, in template (value) ListOfURIs p_notificationURI := {"NotInitialized"}, + in template (omit) TimeWindowType p_timeWindowType, in template (value) AbsRelTimestamp p_timeWindowSize, in template (value) XSD.ID p_creator) modifies m_create := { + to_ := p_parentResourceAddress, + requestIdentifier := testcasename() & "-m_createCrossResourceSubscription", + resourceType := int48, + primitiveContent := {crossResourceSubscription := m_contentCreateCrossResourceSubscription (p_notificationURI, p_name, p_timeWindowType, p_timeWindowSize, p_creator)} + }; + }//end group Create group Delete { @@ -3704,6 +3727,7 @@ module OneM2M_Templates { announcedAttribute := omit,//O stateTag := omit,//NP creator := omit,//O + location := omit,//O maxNrOfInstances := omit,//O maxByteSize := omit,//O maxInstanceAge := omit,//O @@ -3785,6 +3809,7 @@ module OneM2M_Templates { announcedAttribute := *,//O stateTag := omit,//NP creator := *,//O + location := *,//O maxNrOfInstances := *,//O maxByteSize := *,//O maxInstanceAge := *,//O @@ -5257,6 +5282,39 @@ module OneM2M_Templates { bath := *,//O choice := omit//NP }; + + /** + * @desc Base primitiveContent for CREATE operation for CrossResourceSubscription resource + * @param p_notificationURI Notification URI + * @param p_name Resource name + */ + template (value) CrossResourceSubscription_optional m_contentCreateCrossResourceSubscription (in template (value) ListOfURIs p_notificationURI, + in template (omit) XSD.String p_name := c_defaultSubscriptionResourceName, + in template (omit) TimeWindowType p_timeWindowType := int1, + in template (value) AbsRelTimestamp p_timeWindowSize, + in template (value) XSD.ID p_creator) := { + resourceName := p_name,//O + resourceType := omit,//NP + resourceID := omit,//NP + parentID := omit,//NP + creationTime := omit,//NP + lastModifiedTime := omit,//NP + labels := omit,//NP + accessControlPolicyIDs := omit,//O + expirationTime := omit,//NP + dynamicAuthorizationConsultationIDs := omit,//O + creator := p_creator,//M + regularResourcesAsTarget := omit,//O + subscriptionResourcesAsTarget := omit,//O + timeWindowType := p_timeWindowType,//M + timeWindowSize := p_timeWindowSize,//M + eventNotificationCriteriaSet := omit,//O + notificationEventCat := omit,//O + expirationCounter := omit,//O + notificationURI := p_notificationURI,//M + subscriberURI := omit,//O + choice := omit//NP + }; }//end group ContentCreate @@ -5537,6 +5595,7 @@ module OneM2M_Templates { announcedAttribute := omit,//O stateTag := omit,//NP creator := omit,//NP + location := omit, //O maxNrOfInstances := omit,//O maxByteSize := omit,//O maxInstanceAge := omit,//O @@ -6863,6 +6922,7 @@ module OneM2M_Templates { announcedAttribute := *,//O stateTag := ?,//M creator := *,//O + location := *,//O maxNrOfInstances := *,//O maxByteSize := *,//O maxInstanceAge := *,//O @@ -6889,6 +6949,7 @@ module OneM2M_Templates { announcedAttribute := *,//M stateTag := *,//M creator := *,//M + location := *, //O maxNrOfInstances := *,//O maxByteSize := *,//O maxInstanceAge := *,//O @@ -6915,6 +6976,7 @@ module OneM2M_Templates { announcedAttribute := omit,//M stateTag := omit,//M creator := omit,//M + location := omit, //O maxNrOfInstances := omit,//O maxByteSize := omit,//O maxInstanceAge := omit,//O @@ -7583,7 +7645,54 @@ module OneM2M_Templates { nodeLink := omit, //O choice := omit //NP } - + + template CrossResourceSubscription_optional mw_contentCrossResourceSubscriptionBase := { + resourceName := *,//O + resourceType := *,//O + resourceID := *,//O + parentID := *,//O + creationTime := *,//O + lastModifiedTime := *,//O + labels := *,//O + accessControlPolicyIDs := *,//O + expirationTime := *,//O + dynamicAuthorizationConsultationIDs := *,//O + creator := ?,//M + regularResourcesAsTarget := *,//O + subscriptionResourcesAsTarget := *,//O + timeWindowType := ?,//M + timeWindowSize := ?,//M + eventNotificationCriteriaSet := *,//O + notificationEventCat := *,//O + expirationCounter := *,//O + notificationURI := ?,//M + subscriberURI := *,//O + choice := *//O + }; + + template CrossResourceSubscription_optional m_contentCrossResourceSubscription_allOmit := { + resourceName := omit,//O + resourceType := omit,//NP + resourceID := omit,//NP + parentID := omit,//NP + creationTime := omit,//NP + lastModifiedTime := omit,//NP + labels := omit,//NP + accessControlPolicyIDs := omit,//O + expirationTime := omit,//NP + dynamicAuthorizationConsultationIDs := omit,//O + creator := omit,//M + regularResourcesAsTarget := omit,//O + subscriptionResourcesAsTarget := omit,//O + timeWindowType := omit,//M + timeWindowSize := omit,//M + eventNotificationCriteriaSet := omit,//O + notificationEventCat := omit,//O + expirationCounter := omit,//O + notificationURI := omit,//M + subscriberURI := omit,//O + choice := omit//NP + } }//end group responseContent diff --git a/LibOneM2M/OneM2M_TypesAndValues.ttcn b/LibOneM2M/OneM2M_TypesAndValues.ttcn index 3aa24eaebf17ea847c1e83e8d67c41cb80746714..3d4fe7daa9e8c25b5eca63e417a3eada864a416d 100644 --- a/LibOneM2M/OneM2M_TypesAndValues.ttcn +++ b/LibOneM2M/OneM2M_TypesAndValues.ttcn @@ -606,6 +606,7 @@ group OptionalResourceTypes { record length(1 .. infinity) of XSD.NCName announcedAttribute optional, XSD.NonNegativeInteger stateTag optional, XSD.ID creator optional, + GeoCoordinates location optional, //TODO Manually added until XSD files are updated XSD.NonNegativeInteger maxNrOfInstances optional, XSD.NonNegativeInteger maxByteSize optional, XSD.NonNegativeInteger maxInstanceAge optional, @@ -3653,6 +3654,48 @@ group OptionalResourceTypes { variant (choice.choice_list[-]) "untagged"; }; + type record CrossResourceSubscription_optional + { + ResourceName resourceName optional, + ResourceType resourceType optional, + XSD.ID resourceID optional, + NhURI parentID optional, + Timestamp creationTime optional, + Timestamp lastModifiedTime optional, + Labels labels optional, + AcpType accessControlPolicyIDs optional, + Timestamp expirationTime optional, + ListOfURIs dynamicAuthorizationConsultationIDs optional, + XSD.ID creator optional, + ListOfURIs regularResourcesAsTarget optional, + ListOfURIs subscriptionResourcesAsTarget optional, + TimeWindowType timeWindowType optional, + AbsRelTimestamp timeWindowSize optional, + EventNotificationCriteriaSet eventNotificationCriteriaSet optional, + EventCat notificationEventCat optional, + XSD.PositiveInteger expirationCounter optional, + record of XSD.AnyURI notificationURI optional, + XSD.ID subscriberURI optional, + union { + record length(1 .. infinity) of ChildResourceRef childResource_list, + record length(1 .. infinity) of union { + Schedule schedule, + NotificationTargetMgmtPolicyRef notificationTargetMgmtPolicyRef, + Transaction transaction + } choice_list + } choice optional + } + with { + variant "name as uncapitalized"; + variant "element"; + variant (resourceName) "attribute"; + variant (notificationURI) "list"; + variant (choice) "untagged"; + variant (choice.childResource_list) "untagged"; + variant (choice.childResource_list[-]) "name as 'childResource'"; + variant (choice.choice_list) "untagged"; + variant (choice.choice_list[-]) "untagged"; + }; }//end group OptionalResourceTypes @@ -4267,6 +4310,7 @@ group OtherTypes { Clock_optional clock, HotWaterSupply_optional hotWaterSupply, DeviceInfo_optional deviceInfo, + CrossResourceSubscription_optional crossResourceSubscription, //SecurityInfo SecurityInfo securityInfo, //TS-0004 - 7.5.2-1 Elements used for request content diff --git a/OneM2M_PermutationFunctions.ttcn b/OneM2M_PermutationFunctions.ttcn index 55f249009b4c694dd3f3475de86dda84f55e3b09..284c99a499f700c94f3fead7a262a503e6a09cf5 100644 --- a/OneM2M_PermutationFunctions.ttcn +++ b/OneM2M_PermutationFunctions.ttcn @@ -27,365 +27,365 @@ module OneM2M_PermutationFunctions { group Create { - function f_AE_GEN_CRE_001(PrimitiveScope p_primitiveScope) runs on CseSimu system AeSystem { + function f_AE_GEN_CRE_001(PrimitiveScope p_primitiveScope) runs on CseSimu system AeSystem { - var template UtTriggerPrimitive v_utRequest := m_utCreateContainer; - var integer v_resourceIndex := -1; - var MsgIn v_request; - var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for container to "; + var template UtTriggerPrimitive v_utRequest := m_utCreateContainer; + var integer v_resourceIndex := -1; + var MsgIn v_request; + var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for container to "; - if(not(PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { - setverdict(inconc, __SCOPE__ & ": Unstructured-CSE-Relative-Resource-ID format support is required to run this test case"); - stop; - } + if(not(PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { + setverdict(inconc, __SCOPE__ & ": Unstructured-CSE-Relative-Resource-ID format support is required to run this test case"); + stop; + } - f_cf03Up(); + f_cf03Up(); - //Send Trigger Message - v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(-, e_nonHierarchical, p_primitiveScope); - f_ae_sendUtPrimitive(v_utRequest, v_action & f_getLocalResourceAddress(-, e_nonHierarchical, p_primitiveScope)); + //Send Trigger Message + v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(-, e_nonHierarchical, p_primitiveScope); + f_ae_sendUtPrimitive(v_utRequest, v_action & f_getLocalResourceAddress(-, e_nonHierarchical, p_primitiveScope)); - tc_ac.start; - alt { - [] mcaPortIn.receive(mw_request(mw_createContainer(-,v_utRequest.requestPrimitive.to_))) -> value v_request { - tc_ac.stop; - setverdict(pass, __SCOPE__ & " : Container creation request received successfuly"); - v_resourceIndex := f_processCreateRequestPrimitive(v_request.primitive.requestPrimitive); - f_send(e_mcaPortIn, m_response(vc_response.primitive.responsePrimitive)); - } - [] mcaPortIn.receive(mw_request(mw_createContainer())) -> value v_request { - tc_ac.stop; - setverdict(fail, __SCOPE__ & " : Create Request with unexpected target"); - f_send(e_mcaPortIn, m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))); - stop; - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & " : No answer while creating resource"); - stop; - } + tc_ac.start; + alt { + [] mcaPortIn.receive(mw_request(mw_createContainer(-,v_utRequest.requestPrimitive.to_))) -> value v_request { + tc_ac.stop; + setverdict(pass, __SCOPE__ & " : Container creation request received successfuly"); + v_resourceIndex := f_processCreateRequestPrimitive(v_request.primitive.requestPrimitive); + f_send(e_mcaPortIn, m_response(vc_response.primitive.responsePrimitive)); + } + [] mcaPortIn.receive(mw_request(mw_createContainer())) -> value v_request { + tc_ac.stop; + setverdict(fail, __SCOPE__ & " : Create Request with unexpected target"); + f_send(e_mcaPortIn, m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))); + stop; + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & " : No answer while creating resource"); + stop; } - - // Postamble - f_cf03Down(); } - function f_AE_GEN_CRE_002(PrimitiveScope p_primitiveScope) runs on CseSimu system AeSystem { - var MsgIn v_request; - var Integer v_resourceIndex := -1; - var template UtTriggerPrimitive v_utRequest := m_utCreateContainer; - var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for container to "; + + // Postamble + f_cf03Down(); + } + function f_AE_GEN_CRE_002(PrimitiveScope p_primitiveScope) runs on CseSimu system AeSystem { + var MsgIn v_request; + var Integer v_resourceIndex := -1; + var template UtTriggerPrimitive v_utRequest := m_utCreateContainer; + var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for container to "; - //Test Control - if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { - setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); - stop; - } + //Test Control + if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { + setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); + stop; + } - f_cf03Up(); + f_cf03Up(); - //Send Trigger Message - v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(-, e_hierarchical, p_primitiveScope); - f_ae_sendUtPrimitive(v_utRequest,v_action & f_getLocalResourceAddress(-, e_hierarchical, p_primitiveScope)); + //Send Trigger Message + v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(-, e_hierarchical, p_primitiveScope); + f_ae_sendUtPrimitive(v_utRequest,v_action & f_getLocalResourceAddress(-, e_hierarchical, p_primitiveScope)); - tc_ac.start; - alt { - [] mcaPortIn.receive(mw_request(mw_createContainer(-,v_utRequest.requestPrimitive.to_))) -> value v_request { - tc_ac.stop; - setverdict(pass, __SCOPE__ & " : Container creation request received successfuly"); - v_resourceIndex := f_processCreateRequestPrimitive(v_request.primitive.requestPrimitive); - f_send(e_mcaPortIn, m_response(vc_response.primitive.responsePrimitive)); - } - [] mcaPortIn.receive(mw_request(mw_createContainer())) -> value v_request { - tc_ac.stop; - setverdict(fail, __SCOPE__ & " : Create Request with unexpected target"); - f_send(e_mcaPortIn, m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))); - stop; - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & " : No answer while creating resource"); - stop; - } + tc_ac.start; + alt { + [] mcaPortIn.receive(mw_request(mw_createContainer(-,v_utRequest.requestPrimitive.to_))) -> value v_request { + tc_ac.stop; + setverdict(pass, __SCOPE__ & " : Container creation request received successfuly"); + v_resourceIndex := f_processCreateRequestPrimitive(v_request.primitive.requestPrimitive); + f_send(e_mcaPortIn, m_response(vc_response.primitive.responsePrimitive)); + } + [] mcaPortIn.receive(mw_request(mw_createContainer())) -> value v_request { + tc_ac.stop; + setverdict(fail, __SCOPE__ & " : Create Request with unexpected target"); + f_send(e_mcaPortIn, m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))); + stop; + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & " : No answer while creating resource"); + stop; } - - // Postamble - f_cf03Down(); } + + // Postamble + f_cf03Down(); + } } //end group Create group Update { - function f_AE_GEN_UPD_001(PrimitiveScope p_primitiveScope) runs on CseSimu system AeSystem { - var MsgIn v_request; - var template UtTriggerPrimitive v_utRequest := m_utUpdateContainer; - var integer v_resourceIndex; - var PrimitiveContent v_localResource; - var universal charstring v_action := __SCOPE__ & ": Please, send a valid UPDATE Request for container to "; + function f_AE_GEN_UPD_001(PrimitiveScope p_primitiveScope) runs on CseSimu system AeSystem { + var MsgIn v_request; + var template UtTriggerPrimitive v_utRequest := m_utUpdateContainer; + var integer v_resourceIndex; + var PrimitiveContent v_localResource; + var universal charstring v_action := __SCOPE__ & ": Please, send a valid UPDATE Request for container to "; - if(not(PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { - setverdict(inconc, __SCOPE__ & ": Unstructured-CSE-Relative-Resource-ID format support is required to run this test case"); - stop; - } + if(not(PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { + setverdict(inconc, __SCOPE__ & ": Unstructured-CSE-Relative-Resource-ID format support is required to run this test case"); + stop; + } - f_cf03Up(); + f_cf03Up(); - //Send Trigger Message - v_localResource := f_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3); - v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex); - v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex, e_nonHierarchical, p_primitiveScope); - f_ae_sendUtPrimitive(v_utRequest,v_action & f_getLocalResourceAddress(v_resourceIndex, e_nonHierarchical, p_primitiveScope)); + //Send Trigger Message + v_localResource := f_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3); + v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex); + v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex, e_nonHierarchical, p_primitiveScope); + f_ae_sendUtPrimitive(v_utRequest,v_action & f_getLocalResourceAddress(v_resourceIndex, e_nonHierarchical, p_primitiveScope)); - tc_ac.start; - alt { - [] mcaPortIn.receive(mw_request(mw_updateContainer(-,v_utRequest.requestPrimitive.to_))) -> value v_request { - tc_ac.stop; - setverdict(pass, __SCOPE__ & " : Container update request received successfuly"); - f_processUpdateRequestPrimitive(v_request.primitive.requestPrimitive); - f_send(e_mcaPortIn, m_response(vc_response.primitive.responsePrimitive)); - } - [] mcaPortIn.receive(mw_request(mw_updateContainer())) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & " : Update Request with unexpected target"); - f_send(e_mcaPortIn, m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))); - stop; - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & " : No answer while updating resource"); - stop; - } + tc_ac.start; + alt { + [] mcaPortIn.receive(mw_request(mw_updateContainer(-,v_utRequest.requestPrimitive.to_))) -> value v_request { + tc_ac.stop; + setverdict(pass, __SCOPE__ & " : Container update request received successfuly"); + f_processUpdateRequestPrimitive(v_request.primitive.requestPrimitive); + f_send(e_mcaPortIn, m_response(vc_response.primitive.responsePrimitive)); } - - // Postamble - f_cf03Down(); - } - function f_AE_GEN_UPD_002(PrimitiveScope p_primitiveScope) runs on CseSimu system AeSystem { - var MsgIn v_request; - var template UtTriggerPrimitive v_utRequest := m_utUpdateContainer; - var integer v_resourceIndex := -1; - var PrimitiveContent v_localResource; - var universal charstring v_action := __SCOPE__ & ": Please, send a valid UPDATE Request for container to "; - - if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { - setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); + [] mcaPortIn.receive(mw_request(mw_updateContainer())) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & " : Update Request with unexpected target"); + f_send(e_mcaPortIn, m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))); + stop; + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & " : No answer while updating resource"); stop; } + } + + // Postamble + f_cf03Down(); + } + function f_AE_GEN_UPD_002(PrimitiveScope p_primitiveScope) runs on CseSimu system AeSystem { + var MsgIn v_request; + var template UtTriggerPrimitive v_utRequest := m_utUpdateContainer; + var integer v_resourceIndex := -1; + var PrimitiveContent v_localResource; + var universal charstring v_action := __SCOPE__ & ": Please, send a valid UPDATE Request for container to "; + + if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { + setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); + stop; + } - f_cf03Up(); + f_cf03Up(); - //Send Trigger Message - v_localResource := f_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3); - v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex); - v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex, e_hierarchical, p_primitiveScope); - f_ae_sendUtPrimitive(v_utRequest,v_action & f_getLocalResourceAddress(v_resourceIndex, e_hierarchical, p_primitiveScope)); + //Send Trigger Message + v_localResource := f_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3); + v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex); + v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex, e_hierarchical, p_primitiveScope); + f_ae_sendUtPrimitive(v_utRequest,v_action & f_getLocalResourceAddress(v_resourceIndex, e_hierarchical, p_primitiveScope)); - tc_ac.start; - alt { - [] mcaPortIn.receive(mw_request(mw_updateContainer(-,v_utRequest.requestPrimitive.to_))) -> value v_request { - tc_ac.stop; - setverdict(pass, __SCOPE__ & " : Container update request received successfuly"); - f_processUpdateRequestPrimitive(v_request.primitive.requestPrimitive); - f_send(e_mcaPortIn, m_response(vc_response.primitive.responsePrimitive)); - } - [] mcaPortIn.receive(mw_request(mw_updateContainer())) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & " : Update Request with unexpected target"); - f_send(e_mcaPortIn, m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))); - stop; - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & " : No answer while updating resource"); - stop; - } + tc_ac.start; + alt { + [] mcaPortIn.receive(mw_request(mw_updateContainer(-,v_utRequest.requestPrimitive.to_))) -> value v_request { + tc_ac.stop; + setverdict(pass, __SCOPE__ & " : Container update request received successfuly"); + f_processUpdateRequestPrimitive(v_request.primitive.requestPrimitive); + f_send(e_mcaPortIn, m_response(vc_response.primitive.responsePrimitive)); + } + [] mcaPortIn.receive(mw_request(mw_updateContainer())) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & " : Update Request with unexpected target"); + f_send(e_mcaPortIn, m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))); + stop; + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & " : No answer while updating resource"); + stop; } - - // Postamble - f_cf03Down(); } + + // Postamble + f_cf03Down(); + } } //end group Update group Retrieve { - function f_AE_GEN_RET_001(PrimitiveScope p_primitiveScope) runs on CseSimu system AeSystem { - var MsgIn v_request; - var template UtTriggerPrimitive v_utRequest; - var integer v_resourceIndex := -1; - var PrimitiveContent v_localResource; - var universal charstring v_action := __SCOPE__ & ": Please, send a valid RETRIEVE Request for container to "; + function f_AE_GEN_RET_001(PrimitiveScope p_primitiveScope) runs on CseSimu system AeSystem { + var MsgIn v_request; + var template UtTriggerPrimitive v_utRequest; + var integer v_resourceIndex := -1; + var PrimitiveContent v_localResource; + var universal charstring v_action := __SCOPE__ & ": Please, send a valid RETRIEVE Request for container to "; - if(not(PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { - setverdict(inconc, __SCOPE__ & ": Unstructured-CSE-Relative-Resource-ID format support is required to run this test case"); - stop; - } + if(not(PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { + setverdict(inconc, __SCOPE__ & ": Unstructured-CSE-Relative-Resource-ID format support is required to run this test case"); + stop; + } - f_cf03Up(); + f_cf03Up(); - //Send Trigger Message - v_localResource := f_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3); - v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex); - v_utRequest := m_utRetrieve(f_getLocalResourceAddress(v_resourceIndex, e_nonHierarchical, p_primitiveScope)); - f_ae_sendUtPrimitive(v_utRequest,v_action & f_getLocalResourceAddress(v_resourceIndex, e_nonHierarchical, p_primitiveScope)); + //Send Trigger Message + v_localResource := f_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3); + v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex); + v_utRequest := m_utRetrieve(f_getLocalResourceAddress(v_resourceIndex, e_nonHierarchical, p_primitiveScope)); + f_ae_sendUtPrimitive(v_utRequest,v_action & f_getLocalResourceAddress(v_resourceIndex, e_nonHierarchical, p_primitiveScope)); - tc_ac.start; - alt { - [] mcaPortIn.receive(mw_request(mw_retrieve(v_utRequest.requestPrimitive.to_))) -> value v_request { - tc_ac.stop; - setverdict(pass, __SCOPE__ & " : Container retrieve request received successfuly"); - f_processRetrieveRequestPrimitive(v_request.primitive.requestPrimitive); - f_send(e_mcaPortIn, m_response(vc_response.primitive.responsePrimitive)); - } - [] mcaPortIn.receive(mw_request(mw_retrieve(?))) -> value v_request { - tc_ac.stop; - setverdict(fail, __SCOPE__ & " : Retrieve request with unexpected target"); - f_send(e_mcaPortIn, m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))); - stop; - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & " : No answer while retrieving resource"); - stop; - } + tc_ac.start; + alt { + [] mcaPortIn.receive(mw_request(mw_retrieve(v_utRequest.requestPrimitive.to_))) -> value v_request { + tc_ac.stop; + setverdict(pass, __SCOPE__ & " : Container retrieve request received successfuly"); + f_processRetrieveRequestPrimitive(v_request.primitive.requestPrimitive); + f_send(e_mcaPortIn, m_response(vc_response.primitive.responsePrimitive)); } - - // Postamble - f_cf03Down(); - } - function f_AE_GEN_RET_002(PrimitiveScope p_primitiveScope) runs on CseSimu system AeSystem { - var MsgIn v_request; - var template UtTriggerPrimitive v_utRequest; - var integer v_resourceIndex := -1; - var PrimitiveContent v_localResource; - var universal charstring v_action := __SCOPE__ & ": Please, send a valid RETRIEVE Request for container to "; - - if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { - setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); + [] mcaPortIn.receive(mw_request(mw_retrieve(?))) -> value v_request { + tc_ac.stop; + setverdict(fail, __SCOPE__ & " : Retrieve request with unexpected target"); + f_send(e_mcaPortIn, m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))); + stop; + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & " : No answer while retrieving resource"); stop; } + } + + // Postamble + f_cf03Down(); + } + function f_AE_GEN_RET_002(PrimitiveScope p_primitiveScope) runs on CseSimu system AeSystem { + var MsgIn v_request; + var template UtTriggerPrimitive v_utRequest; + var integer v_resourceIndex := -1; + var PrimitiveContent v_localResource; + var universal charstring v_action := __SCOPE__ & ": Please, send a valid RETRIEVE Request for container to "; + + if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { + setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); + stop; + } - f_cf03Up(); + f_cf03Up(); - //Send Trigger Message - v_localResource := f_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3); - v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex); - v_utRequest := m_utRetrieve(f_getLocalResourceAddress(v_resourceIndex, e_hierarchical, p_primitiveScope)); - f_ae_sendUtPrimitive(v_utRequest,v_action & f_getLocalResourceAddress(v_resourceIndex, e_hierarchical, p_primitiveScope)); + //Send Trigger Message + v_localResource := f_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3); + v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex); + v_utRequest := m_utRetrieve(f_getLocalResourceAddress(v_resourceIndex, e_hierarchical, p_primitiveScope)); + f_ae_sendUtPrimitive(v_utRequest,v_action & f_getLocalResourceAddress(v_resourceIndex, e_hierarchical, p_primitiveScope)); - tc_ac.start; - alt { - [] mcaPortIn.receive(mw_request(mw_retrieve(v_utRequest.requestPrimitive.to_))) -> value v_request { - tc_ac.stop; - setverdict(pass, __SCOPE__ & " : Container retrieve request received successfuly"); - f_processRetrieveRequestPrimitive(v_request.primitive.requestPrimitive); - f_send(e_mcaPortIn, m_response(vc_response.primitive.responsePrimitive)); - } - [] mcaPortIn.receive(mw_request(mw_retrieve(?))) -> value v_request { - tc_ac.stop; - setverdict(fail, __SCOPE__ & " : Retrieve request with unexpected target"); - f_send(e_mcaPortIn, m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))); - stop; - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & " : No answer while retrieving resource"); - stop; - } + tc_ac.start; + alt { + [] mcaPortIn.receive(mw_request(mw_retrieve(v_utRequest.requestPrimitive.to_))) -> value v_request { + tc_ac.stop; + setverdict(pass, __SCOPE__ & " : Container retrieve request received successfuly"); + f_processRetrieveRequestPrimitive(v_request.primitive.requestPrimitive); + f_send(e_mcaPortIn, m_response(vc_response.primitive.responsePrimitive)); + } + [] mcaPortIn.receive(mw_request(mw_retrieve(?))) -> value v_request { + tc_ac.stop; + setverdict(fail, __SCOPE__ & " : Retrieve request with unexpected target"); + f_send(e_mcaPortIn, m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))); + stop; + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & " : No answer while retrieving resource"); + stop; } - - // Postamble - f_cf03Down(); } + + // Postamble + f_cf03Down(); + } } //end group Retrieve group Delete { - function f_AE_GEN_DEL_001(PrimitiveScope p_primitiveScope) runs on CseSimu system AeSystem { - var MsgIn v_request; - var template UtTriggerPrimitive v_utRequest := m_utDelete; - var integer v_auxInteger; - var PrimitiveContent v_localResource; - var universal charstring v_action := __SCOPE__ & ": Please, send a valid DELETE Request for container to "; + function f_AE_GEN_DEL_001(PrimitiveScope p_primitiveScope) runs on CseSimu system AeSystem { + var MsgIn v_request; + var template UtTriggerPrimitive v_utRequest := m_utDelete; + var integer v_auxInteger; + var PrimitiveContent v_localResource; + var universal charstring v_action := __SCOPE__ & ": Please, send a valid DELETE Request for container to "; - if(not(PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { - setverdict(inconc, __SCOPE__ & ": Unstructured-CSE-Relative-Resource-ID format support is required to run this test case"); - stop; - } + if(not(PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { + setverdict(inconc, __SCOPE__ & ": Unstructured-CSE-Relative-Resource-ID format support is required to run this test case"); + stop; + } - f_cf03Up(); + f_cf03Up(); - //Send Trigger Message - v_localResource := f_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3); - v_auxInteger := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex); - v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger, e_nonHierarchical, p_primitiveScope); - f_ae_sendUtPrimitive(v_utRequest,v_action & f_getLocalResourceAddress(v_auxInteger, e_nonHierarchical, p_primitiveScope)); + //Send Trigger Message + v_localResource := f_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3); + v_auxInteger := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex); + v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger, e_nonHierarchical, p_primitiveScope); + f_ae_sendUtPrimitive(v_utRequest,v_action & f_getLocalResourceAddress(v_auxInteger, e_nonHierarchical, p_primitiveScope)); - tc_ac.start; - alt { - [] mcaPortIn.receive(mw_request(mw_delete(v_utRequest.requestPrimitive.to_))) -> value v_request { - tc_ac.stop; - setverdict(pass, __SCOPE__ & " : Container delete request received successfuly"); - f_processDeleteRequestPrimitive(v_request.primitive.requestPrimitive); - f_send(e_mcaPortIn, m_response(vc_response.primitive.responsePrimitive)); - } - [] mcaPortIn.receive(mw_request(mw_delete(?))) -> value v_request { - tc_ac.stop; - setverdict(fail, __SCOPE__ & " : Delete request with unexpected target"); - f_send(e_mcaPortIn, m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))); - stop; - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & " : No answer while updating resource"); - stop; - } + tc_ac.start; + alt { + [] mcaPortIn.receive(mw_request(mw_delete(v_utRequest.requestPrimitive.to_))) -> value v_request { + tc_ac.stop; + setverdict(pass, __SCOPE__ & " : Container delete request received successfuly"); + f_processDeleteRequestPrimitive(v_request.primitive.requestPrimitive); + f_send(e_mcaPortIn, m_response(vc_response.primitive.responsePrimitive)); } - - // Postamble - f_cf03Down(); - } - function f_AE_GEN_DEL_002(PrimitiveScope p_primitiveScope) runs on CseSimu system AeSystem { - var MsgIn v_request; - var template UtTriggerPrimitive v_utRequest := m_utDelete; - var integer v_auxInteger; - var PrimitiveContent v_localResource; - var universal charstring v_action := __SCOPE__ & ": Please, send a valid DELETE Request for container to "; - - if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { - setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); + [] mcaPortIn.receive(mw_request(mw_delete(?))) -> value v_request { + tc_ac.stop; + setverdict(fail, __SCOPE__ & " : Delete request with unexpected target"); + f_send(e_mcaPortIn, m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))); + stop; + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & " : No answer while updating resource"); stop; } + } + + // Postamble + f_cf03Down(); + } + function f_AE_GEN_DEL_002(PrimitiveScope p_primitiveScope) runs on CseSimu system AeSystem { + var MsgIn v_request; + var template UtTriggerPrimitive v_utRequest := m_utDelete; + var integer v_auxInteger; + var PrimitiveContent v_localResource; + var universal charstring v_action := __SCOPE__ & ": Please, send a valid DELETE Request for container to "; + + if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { + setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); + stop; + } - f_cf03Up(); + f_cf03Up(); - //Send Trigger Message - v_localResource := f_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3); - v_auxInteger := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex); - v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger, e_hierarchical, p_primitiveScope); - f_ae_sendUtPrimitive(v_utRequest,v_action & f_getLocalResourceAddress(v_auxInteger, e_hierarchical, p_primitiveScope)); + //Send Trigger Message + v_localResource := f_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3); + v_auxInteger := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex); + v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger, e_hierarchical, p_primitiveScope); + f_ae_sendUtPrimitive(v_utRequest,v_action & f_getLocalResourceAddress(v_auxInteger, e_hierarchical, p_primitiveScope)); - tc_ac.start; - alt { - [] mcaPortIn.receive(mw_request(mw_delete(v_utRequest.requestPrimitive.to_))) -> value v_request { - tc_ac.stop; - setverdict(pass, __SCOPE__ & " : Container delete request received successfuly"); - f_processDeleteRequestPrimitive(v_request.primitive.requestPrimitive); - f_send(e_mcaPortIn, m_response(vc_response.primitive.responsePrimitive)); - } - [] mcaPortIn.receive(mw_request(mw_delete(?))) -> value v_request { - tc_ac.stop; - setverdict(fail, __SCOPE__ & " : Delete request with unexpected target"); - f_send(e_mcaPortIn, m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))); - stop; - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & " : No answer while updating resource"); - stop; - } + tc_ac.start; + alt { + [] mcaPortIn.receive(mw_request(mw_delete(v_utRequest.requestPrimitive.to_))) -> value v_request { + tc_ac.stop; + setverdict(pass, __SCOPE__ & " : Container delete request received successfuly"); + f_processDeleteRequestPrimitive(v_request.primitive.requestPrimitive); + f_send(e_mcaPortIn, m_response(vc_response.primitive.responsePrimitive)); + } + [] mcaPortIn.receive(mw_request(mw_delete(?))) -> value v_request { + tc_ac.stop; + setverdict(fail, __SCOPE__ & " : Delete request with unexpected target"); + f_send(e_mcaPortIn, m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))); + stop; + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & " : No answer while updating resource"); + stop; } - - // Postamble - f_cf03Down(); } + + // Postamble + f_cf03Down(); + } } //end group Delete @@ -395,47 +395,47 @@ module OneM2M_PermutationFunctions { group Create { - function f_AE_REG_CRE_002(template UtTriggerPrimitive p_utRequest, template RequestPrimitive p_request, in universal charstring p_action) runs on CseSimu system AeSystem { - - //primitives for mcaPortIn - var MsgIn v_request; - var integer v_parentIndex := -1; - var integer v_resourceIndex := -1; - var PrimitiveContent v_resource; - var ResponsePrimitive v_responsePrimitive; - - f_cf03Up(); - - //Send Trigger Message - p_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(-, -, -); - p_request.to_ := p_utRequest.requestPrimitive.to_; - f_ae_sendUtPrimitive(p_utRequest,p_action & f_getLocalResourceAddress(-, -, -)); - - //Test behavior - tc_ac.start; - alt{ - [] mcaPortIn.receive(mw_request(p_request)) -> value v_request { - tc_ac.stop; - setverdict(pass, __SCOPE__ & " : AE registration request is accepted!!"); - v_resourceIndex := f_processCreateRequestPrimitive(v_request.primitive.requestPrimitive); - - //send back responsePrimitive - f_send(e_mcaPortIn, m_response(vc_response.primitive.responsePrimitive)); - } - [] mcaPortIn.receive(mw_request(mw_createAe())) -> value v_request { - tc_ac.stop; - setverdict(fail, __SCOPE__ & " : Unexpected AE registration request"); - f_send(e_mcaPortIn, m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))); - } - [] tc_ac.timeout{ - setverdict(fail, __SCOPE__ & " : Timeout due to no response received from requested SUT!"); - } - - } - - // Postamble - f_cf03Down(); - } + function f_AE_REG_CRE_002(template UtTriggerPrimitive p_utRequest, template RequestPrimitive p_request, in universal charstring p_action) runs on CseSimu system AeSystem { + + //primitives for mcaPortIn + var MsgIn v_request; + var integer v_parentIndex := -1; + var integer v_resourceIndex := -1; + var PrimitiveContent v_resource; + var ResponsePrimitive v_responsePrimitive; + + f_cf03Up(); + + //Send Trigger Message + p_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(-, -, -); + p_request.to_ := p_utRequest.requestPrimitive.to_; + f_ae_sendUtPrimitive(p_utRequest,p_action & f_getLocalResourceAddress(-, -, -)); + + //Test behavior + tc_ac.start; + alt{ + [] mcaPortIn.receive(mw_request(p_request)) -> value v_request { + tc_ac.stop; + setverdict(pass, __SCOPE__ & " : AE registration request is accepted!!"); + v_resourceIndex := f_processCreateRequestPrimitive(v_request.primitive.requestPrimitive); + + //send back responsePrimitive + f_send(e_mcaPortIn, m_response(vc_response.primitive.responsePrimitive)); + } + [] mcaPortIn.receive(mw_request(mw_createAe())) -> value v_request { + tc_ac.stop; + setverdict(fail, __SCOPE__ & " : Unexpected AE registration request"); + f_send(e_mcaPortIn, m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))); + } + [] tc_ac.timeout{ + setverdict(fail, __SCOPE__ & " : Timeout due to no response received from requested SUT!"); + } + + } + + // Postamble + f_cf03Down(); + } } // End of subgroup Create @@ -449,219 +449,219 @@ module OneM2M_PermutationFunctions { group Create { - function f_AE_DMR_CRE_003(template UtTriggerPrimitive p_utRequest, template RequestPrimitive p_request, in universal charstring p_action) runs on CseSimu system AeSystem { - var MsgIn v_request; - var integer v_resourceIndex := -1; - var PrimitiveContent v_localResource; - var integer v_containerIndex := -1; + function f_AE_DMR_CRE_003(template UtTriggerPrimitive p_utRequest, template RequestPrimitive p_request, in universal charstring p_action) runs on CseSimu system AeSystem { + var MsgIn v_request; + var integer v_resourceIndex := -1; + var PrimitiveContent v_localResource; + var integer v_containerIndex := -1; - //Test component configuration - f_cf03Up(); - - //send triggering - v_localResource := f_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3); - v_containerIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex); - p_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_containerIndex, -, -); - p_request.to_ := p_utRequest.requestPrimitive.to_; - f_ae_sendUtPrimitive(p_utRequest,p_action & f_getLocalResourceAddress(v_containerIndex, -, -)); + //Test component configuration + f_cf03Up(); - //Test behavior - tc_ac.start; - alt{ + //send triggering + v_localResource := f_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3); + v_containerIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex); + p_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_containerIndex, -, -); + p_request.to_ := p_utRequest.requestPrimitive.to_; + f_ae_sendUtPrimitive(p_utRequest,p_action & f_getLocalResourceAddress(v_containerIndex, -, -)); - //receive MsgIn requestPrimitive - [] mcaPortIn.receive(mw_request(p_request)) -> value v_request { - tc_ac.stop; - setverdict(pass, __SCOPE__ & " : ContentInstance creation request is accepted!!"); - v_resourceIndex := f_processCreateRequestPrimitive(v_request.primitive.requestPrimitive); - //send back responsePrimitive - f_send(e_mcaPortIn, m_response(vc_response.primitive.responsePrimitive)); - } + //Test behavior + tc_ac.start; + alt{ - [] mcaPortIn.receive(mw_request(mw_create)) -> value v_request{ - tc_ac.stop; - setverdict(fail, __SCOPE__ & " : Unexpected CREATE request "); - f_send(e_mcaPortIn, m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))); - } - [] tc_ac.timeout{ - setverdict(fail, __SCOPE__ & " : Timeout due to no response received from requested SUT!"); - } + //receive MsgIn requestPrimitive + [] mcaPortIn.receive(mw_request(p_request)) -> value v_request { + tc_ac.stop; + setverdict(pass, __SCOPE__ & " : ContentInstance creation request is accepted!!"); + v_resourceIndex := f_processCreateRequestPrimitive(v_request.primitive.requestPrimitive); + //send back responsePrimitive + f_send(e_mcaPortIn, m_response(vc_response.primitive.responsePrimitive)); } - // Postamble - f_cf03Down(); + [] mcaPortIn.receive(mw_request(mw_create)) -> value v_request{ + tc_ac.stop; + setverdict(fail, __SCOPE__ & " : Unexpected CREATE request "); + f_send(e_mcaPortIn, m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))); + } + [] tc_ac.timeout{ + setverdict(fail, __SCOPE__ & " : Timeout due to no response received from requested SUT!"); + } } - function f_AE_DMR_CRE_004(template UtTriggerPrimitive p_utRequest, template RequestPrimitive p_request, in universal charstring p_action) runs on CseSimu system AeSystem { - var MsgIn v_request; - var integer v_resourceIndex := -1; + + // Postamble + f_cf03Down(); + } + function f_AE_DMR_CRE_004(template UtTriggerPrimitive p_utRequest, template RequestPrimitive p_request, in universal charstring p_action) runs on CseSimu system AeSystem { + var MsgIn v_request; + var integer v_resourceIndex := -1; - //Test component configuration - f_cf03Up(); + //Test component configuration + f_cf03Up(); - //send triggering primitive to SUT - p_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(-, -, -); - p_request.to_ := p_utRequest.requestPrimitive.to_; - f_ae_sendUtPrimitive(p_utRequest,p_action & f_getLocalResourceAddress(-, -, -)); + //send triggering primitive to SUT + p_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(-, -, -); + p_request.to_ := p_utRequest.requestPrimitive.to_; + f_ae_sendUtPrimitive(p_utRequest,p_action & f_getLocalResourceAddress(-, -, -)); - //Test behavior - tc_ac.start; - alt{ + //Test behavior + tc_ac.start; + alt{ - //receive MsgIn requestPrimitive - [] mcaPortIn.receive(mw_request(p_request)) -> value v_request { - tc_ac.stop; - setverdict(pass, __SCOPE__ & " : Container creation request is accepted!!"); - v_resourceIndex := f_processCreateRequestPrimitive(v_request.primitive.requestPrimitive); - //send back responsePrimitive - f_send(e_mcaPortIn, m_response(vc_response.primitive.responsePrimitive)); - } - [] mcaPortIn.receive(mw_request(mw_create)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & " : Unexpected CREATE request "); - f_send(e_mcaPortIn, m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))); - } - [] tc_ac.timeout{ - setverdict(fail, __SCOPE__ & " : Timeout due to no response received from requested SUT!"); - } + //receive MsgIn requestPrimitive + [] mcaPortIn.receive(mw_request(p_request)) -> value v_request { + tc_ac.stop; + setverdict(pass, __SCOPE__ & " : Container creation request is accepted!!"); + v_resourceIndex := f_processCreateRequestPrimitive(v_request.primitive.requestPrimitive); + //send back responsePrimitive + f_send(e_mcaPortIn, m_response(vc_response.primitive.responsePrimitive)); + } + [] mcaPortIn.receive(mw_request(mw_create)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & " : Unexpected CREATE request "); + f_send(e_mcaPortIn, m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))); + } + [] tc_ac.timeout{ + setverdict(fail, __SCOPE__ & " : Timeout due to no response received from requested SUT!"); } - - // Postamble - f_cf03Down(); } + + // Postamble + f_cf03Down(); + } }//End of subgroup Create group Update { - function f_AE_DMR_UPD_001(template UtTriggerPrimitive p_utRequest, in universal charstring p_action, template RequestPrimitive p_expectedUpdateRequest) runs on CseSimu system AeSystem { + function f_AE_DMR_UPD_001(template UtTriggerPrimitive p_utRequest, in universal charstring p_action, template RequestPrimitive p_expectedUpdateRequest) runs on CseSimu system AeSystem { - //primitives for mcaPortIn - var MsgIn v_request; - var integer v_resourceIndex := -1; - var PrimitiveContent v_localResource; + //primitives for mcaPortIn + var MsgIn v_request; + var integer v_resourceIndex := -1; + var PrimitiveContent v_localResource; - f_cf03Up(); + f_cf03Up(); - //Preamble + //Preamble - //Send Tr - v_localResource := f_generateLocalResource(valueof(m_primitiveContentAe(m_contentCreateAe(omit, -, -, omit))), vc_cSEBaseIndex, int2); - v_resourceIndex := f_setLocalResource(v_localResource, int2, vc_cSEBaseIndex); - p_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex); - f_ae_sendUtPrimitive(p_utRequest,p_action & f_getLocalResourceAddress(v_resourceIndex)); + //Send Tr + v_localResource := f_generateLocalResource(valueof(m_primitiveContentAe(m_contentCreateAe(omit, -, -, omit))), vc_cSEBaseIndex, int2); + v_resourceIndex := f_setLocalResource(v_localResource, int2, vc_cSEBaseIndex); + p_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex); + f_ae_sendUtPrimitive(p_utRequest,p_action & f_getLocalResourceAddress(v_resourceIndex)); - //Test behavior + //Test behavior - tc_ac.start; - alt{ - [] mcaPortIn.receive(mw_request(p_expectedUpdateRequest)) -> value v_request { - tc_ac.stop; - setverdict(pass, __SCOPE__ & " : AE update request is accepted!"); - f_processUpdateRequestPrimitive(v_request.primitive.requestPrimitive); - f_send(e_mcaPortIn, m_response(vc_response.primitive.responsePrimitive)); - } - [] mcaPortIn.receive(mw_request(mw_update)) -> value v_request { - tc_ac.stop; - setverdict(fail, __SCOPE__ & " : Unexpected UPDATE request"); - f_send(e_mcaPortIn, m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))); - } - [] tc_ac.timeout{ - setverdict(fail, __SCOPE__ & " : Timeout due to no response received from requested SUT!"); - } - - } - - // Postamble - f_cf03Down(); - } - - function f_AE_DMR_UPD_002(template UtTriggerPrimitive p_utRequest, template RequestPrimitive p_request, in universal charstring p_action) runs on CseSimu system AeSystem { - var MsgIn v_request; - var PrimitiveContent v_localResource; - var integer v_resourceIndex := -1; + tc_ac.start; + alt{ + [] mcaPortIn.receive(mw_request(p_expectedUpdateRequest)) -> value v_request { + tc_ac.stop; + setverdict(pass, __SCOPE__ & " : AE update request is accepted!"); + f_processUpdateRequestPrimitive(v_request.primitive.requestPrimitive); + f_send(e_mcaPortIn, m_response(vc_response.primitive.responsePrimitive)); + } + [] mcaPortIn.receive(mw_request(mw_update)) -> value v_request { + tc_ac.stop; + setverdict(fail, __SCOPE__ & " : Unexpected UPDATE request"); + f_send(e_mcaPortIn, m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))); + } + [] tc_ac.timeout{ + setverdict(fail, __SCOPE__ & " : Timeout due to no response received from requested SUT!"); + } + + } + + // Postamble + f_cf03Down(); + } + + function f_AE_DMR_UPD_002(template UtTriggerPrimitive p_utRequest, template RequestPrimitive p_request, in universal charstring p_action) runs on CseSimu system AeSystem { + var MsgIn v_request; + var PrimitiveContent v_localResource; + var integer v_resourceIndex := -1; - //Test component configuration - f_cf03Up(); + //Test component configuration + f_cf03Up(); - //send triggering - v_localResource := f_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3); - v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex); - p_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex); - f_ae_sendUtPrimitive(p_utRequest,p_action & f_getLocalResourceAddress(v_resourceIndex)); + //send triggering + v_localResource := f_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3); + v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex); + p_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex); + f_ae_sendUtPrimitive(p_utRequest,p_action & f_getLocalResourceAddress(v_resourceIndex)); - //Test behavior - tc_ac.start; - alt{ + //Test behavior + tc_ac.start; + alt{ - //receive MsgIn requestPrimitive - [] mcaPortIn.receive(mw_request(p_request)) -> value v_request { - tc_ac.stop; - setverdict(pass, __SCOPE__ & " : Container update request is accepted!!"); - f_processUpdateRequestPrimitive(v_request.primitive.requestPrimitive); - f_send(e_mcaPortIn, m_response(vc_response.primitive.responsePrimitive)); - } - [] mcaPortIn.receive(mw_request(mw_update)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & " : Unexpected UPDATE request"); - f_send(e_mcaPortIn, m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))); - } - [] tc_ac.timeout{ - setverdict(fail, __SCOPE__ & " : Timeout due to no response received from requested SUT!"); - } + //receive MsgIn requestPrimitive + [] mcaPortIn.receive(mw_request(p_request)) -> value v_request { + tc_ac.stop; + setverdict(pass, __SCOPE__ & " : Container update request is accepted!!"); + f_processUpdateRequestPrimitive(v_request.primitive.requestPrimitive); + f_send(e_mcaPortIn, m_response(vc_response.primitive.responsePrimitive)); + } + [] mcaPortIn.receive(mw_request(mw_update)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & " : Unexpected UPDATE request"); + f_send(e_mcaPortIn, m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))); + } + [] tc_ac.timeout{ + setverdict(fail, __SCOPE__ & " : Timeout due to no response received from requested SUT!"); } - - // Postamble - f_cf03Down(); } + // Postamble + f_cf03Down(); + } + }//End of subgroup Update group Retrieve { - function f_AE_DMR_RET_001(ResourceType p_resourceType, in template (omit) PrimitiveContent p_primitiveContent, in universal charstring p_action) runs on CseSimu system AeSystem { + function f_AE_DMR_RET_001(ResourceType p_resourceType, in template (omit) PrimitiveContent p_primitiveContent, in universal charstring p_action) runs on CseSimu system AeSystem { - //variables - var template UtTriggerPrimitive v_utRequest; - var MsgIn v_request; - var ResponsePrimitive v_responsePrimitive; - var PrimitiveContent v_localResource; - var integer v_resourceIndex := -1; + //variables + var template UtTriggerPrimitive v_utRequest; + var MsgIn v_request; + var ResponsePrimitive v_responsePrimitive; + var PrimitiveContent v_localResource; + var integer v_resourceIndex := -1; - //Test component configuration - f_cf03Up(); + //Test component configuration + f_cf03Up(); - //send triggering message - if(p_resourceType != int5) { - v_localResource := f_generateLocalResource(p_primitiveContent, vc_cSEBaseIndex, p_resourceType); - v_resourceIndex := f_setLocalResource(v_localResource, p_resourceType, vc_cSEBaseIndex); - } else { - v_resourceIndex := vc_cSEBaseIndex; - } - v_utRequest := m_utRetrieve(f_getLocalResourceAddress(v_resourceIndex)); - f_ae_sendUtPrimitive(v_utRequest,p_action & f_getLocalResourceAddress(v_resourceIndex)); + //send triggering message + if(p_resourceType != int5) { + v_localResource := f_generateLocalResource(p_primitiveContent, vc_cSEBaseIndex, p_resourceType); + v_resourceIndex := f_setLocalResource(v_localResource, p_resourceType, vc_cSEBaseIndex); + } else { + v_resourceIndex := vc_cSEBaseIndex; + } + v_utRequest := m_utRetrieve(f_getLocalResourceAddress(v_resourceIndex)); + f_ae_sendUtPrimitive(v_utRequest,p_action & f_getLocalResourceAddress(v_resourceIndex)); - //Test behavior - tc_ac.start; - alt{ - [] mcaPortIn.receive(mw_request(mw_retrieve(f_getLocalResourceAddress(v_resourceIndex)))) -> value v_request { - tc_ac.stop; - setverdict(pass, __SCOPE__ & " : retrieve resource type request is accepted!!"); - v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource)); - f_send(e_mcaPortIn, m_response(v_responsePrimitive)); - } - [] mcaPortIn.receive (mw_request(mw_retrieve(?))){ - tc_ac.stop; - setverdict(fail, __SCOPE__ & " : Retrieve request for unexpected target"); - f_send(e_mcaPortIn, m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))); - } - [] tc_ac.timeout{ - setverdict(fail, __SCOPE__ & " : Timeout due to no response received from requested SUT!"); - } + //Test behavior + tc_ac.start; + alt{ + [] mcaPortIn.receive(mw_request(mw_retrieve(f_getLocalResourceAddress(v_resourceIndex)))) -> value v_request { + tc_ac.stop; + setverdict(pass, __SCOPE__ & " : retrieve resource type request is accepted!!"); + v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource)); + f_send(e_mcaPortIn, m_response(v_responsePrimitive)); + } + [] mcaPortIn.receive (mw_request(mw_retrieve(?))){ + tc_ac.stop; + setverdict(fail, __SCOPE__ & " : Retrieve request for unexpected target"); + f_send(e_mcaPortIn, m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))); + } + [] tc_ac.timeout{ + setverdict(fail, __SCOPE__ & " : Timeout due to no response received from requested SUT!"); } - - // Postamble - f_cf03Down(); } + + // Postamble + f_cf03Down(); + } }//End of subgroup Retrieve @@ -676,47 +676,47 @@ module OneM2M_PermutationFunctions { group Create { - function f_AE_SUB_CRE_002(template UtTriggerPrimitive p_utRequest, template RequestPrimitive p_request, in universal charstring p_action) runs on CseSimu system AeSystem { + function f_AE_SUB_CRE_002(template UtTriggerPrimitive p_utRequest, template RequestPrimitive p_request, in universal charstring p_action) runs on CseSimu system AeSystem { - var MsgIn v_request; - var integer v_parentIndex := -1; - var integer v_resourceIndex := -1; - var PrimitiveContent v_resource; - var ResponsePrimitive v_responsePrimitive; + var MsgIn v_request; + var integer v_parentIndex := -1; + var integer v_resourceIndex := -1; + var PrimitiveContent v_resource; + var ResponsePrimitive v_responsePrimitive; - f_cf03Up(); + f_cf03Up(); - //send triggering primitive to SUT - p_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(); - f_ae_sendUtPrimitive(p_utRequest,p_action); + //send triggering primitive to SUT + p_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(); + f_ae_sendUtPrimitive(p_utRequest,p_action); - //Test behavior - tc_ac.start; - alt{ - [] mcaPortIn.receive(mw_request(p_request)) -> value v_request { - tc_ac.stop; - setverdict(pass, __SCOPE__ & " : Subscription creation request is accepted!"); - v_parentIndex := f_getLocalResourceIndex(v_request.primitive.requestPrimitive.to_); - v_resource := f_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, v_parentIndex, v_request.primitive.requestPrimitive.resourceType); - v_resourceIndex := f_setLocalResource(v_resource, v_request.primitive.requestPrimitive.resourceType, v_parentIndex); - v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource)); - //send back responsePrimitive - f_send(e_mcaPortIn, m_response(v_responsePrimitive)); - } - [] mcaPortIn.receive { - tc_ac.stop; - setverdict(fail, __SCOPE__ & " : Subscription creation request is rejected due to not including the optional attribute!"); - f_send(e_mcaPortIn, m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))); - } - [] tc_ac.timeout{ - setverdict(fail, __SCOPE__ & " : Timeout due to no response received from requested SUT!"); - } + //Test behavior + tc_ac.start; + alt{ + [] mcaPortIn.receive(mw_request(p_request)) -> value v_request { + tc_ac.stop; + setverdict(pass, __SCOPE__ & " : Subscription creation request is accepted!"); + v_parentIndex := f_getLocalResourceIndex(v_request.primitive.requestPrimitive.to_); + v_resource := f_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, v_parentIndex, v_request.primitive.requestPrimitive.resourceType); + v_resourceIndex := f_setLocalResource(v_resource, v_request.primitive.requestPrimitive.resourceType, v_parentIndex); + v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource)); + //send back responsePrimitive + f_send(e_mcaPortIn, m_response(v_responsePrimitive)); + } + [] mcaPortIn.receive { + tc_ac.stop; + setverdict(fail, __SCOPE__ & " : Subscription creation request is rejected due to not including the optional attribute!"); + f_send(e_mcaPortIn, m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit)))); } + [] tc_ac.timeout{ + setverdict(fail, __SCOPE__ & " : Timeout due to no response received from requested SUT!"); + } + } - // Postamble - f_cf03Down(); + // Postamble + f_cf03Down(); - } + } }//End Create Group @@ -1073,7 +1073,7 @@ module OneM2M_PermutationFunctions { function f_AE_HAIM_CRE_001(in universal charstring p_action, in template UtTriggerPrimitive p_utRequest, in template RequestPrimitive p_requestPrimitive) runs on CseSimu system AeSystem { - var integer v_resourceIndex := -1; + var integer v_resourceIndex := -1; //Test component configuration f_cf03Up(); @@ -1089,16 +1089,16 @@ module OneM2M_PermutationFunctions { [] mcaPortIn.receive(mw_request(p_requestPrimitive)) -> value vc_request { tc_ac.stop; setverdict(pass, __SCOPE__ & " : Device model creation request is accepted"); - v_resourceIndex := f_processCreateRequestPrimitive(vc_request.primitive.requestPrimitive); + v_resourceIndex := f_processCreateRequestPrimitive(vc_request.primitive.requestPrimitive); f_send(e_mcaPortIn, m_response(vc_response.primitive.responsePrimitive)); } [] mcaPortIn.receive(mw_request(mw_create)) -> value vc_request { tc_ac.stop; //Send Response - v_resourceIndex := f_processCreateRequestPrimitive(vc_request.primitive.requestPrimitive); + v_resourceIndex := f_processCreateRequestPrimitive(vc_request.primitive.requestPrimitive); f_send(e_mcaPortIn, m_response(vc_response.primitive.responsePrimitive)); tc_ac.start; - repeat; + repeat; } [] tc_ac.timeout{ setverdict(fail, __SCOPE__ & " : Timeout due to no required request received from SUT"); @@ -1107,11 +1107,11 @@ module OneM2M_PermutationFunctions { // Postamble f_cf03Down(); - } + } function f_AE_HAIM_CRE_002(in universal charstring p_action, in template UtTriggerPrimitive p_utRequest, in template RequestPrimitive p_requestPrimitive1, in template RequestPrimitive p_requestPrimitive2) runs on CseSimu system AeSystem { - var integer v_resourceIndex := -1; + var integer v_resourceIndex := -1; var integer v_parentResourceIndex := -1; //Test component configuration @@ -1134,13 +1134,13 @@ module OneM2M_PermutationFunctions { [] mcaPortIn.receive(mw_request(p_requestPrimitive2)) -> value vc_request { tc_ac.stop; setverdict(pass, __SCOPE__ & " : Module class creation request is accepted"); - v_resourceIndex := f_processCreateRequestPrimitive(vc_request.primitive.requestPrimitive); + v_resourceIndex := f_processCreateRequestPrimitive(vc_request.primitive.requestPrimitive); f_send(e_mcaPortIn, m_response(vc_response.primitive.responsePrimitive)); } [] mcaPortIn.receive(mw_request(mw_create)) -> value vc_request { tc_ac.stop; //Send response - v_resourceIndex := f_processCreateRequestPrimitive(vc_request.primitive.requestPrimitive); + v_resourceIndex := f_processCreateRequestPrimitive(vc_request.primitive.requestPrimitive); f_send(e_mcaPortIn, m_response(vc_response.primitive.responsePrimitive)); tc_ac.start; repeat; @@ -1152,16 +1152,16 @@ module OneM2M_PermutationFunctions { // Postamble f_cf03Down(); - } + } function f_AE_HAIM_CRE_003(in universal charstring p_action, in template UtTriggerPrimitive p_utRequest, in template RequestPrimitive p_requestPrimitive) runs on CseSimu system AeSystem { - var integer v_resourceIndex := -1; - var integer v_resourceIndexNode := -1; - var integer v_resourceIndexDeviceInfo := -1; - var boolean v_nodeCreated := false; - var boolean v_deviceInfoCreated := false; - var XSD.ID v_resourceAddressNode; + var integer v_resourceIndex := -1; + var integer v_resourceIndexNode := -1; + var integer v_resourceIndexDeviceInfo := -1; + var boolean v_nodeCreated := false; + var boolean v_deviceInfoCreated := false; + var XSD.ID v_resourceAddressNode; //Test component configuration f_cf03Up(); @@ -1182,7 +1182,7 @@ module OneM2M_PermutationFunctions { alt{ [v_deviceInfoCreated] mcaPortIn.receive(mw_request(p_requestPrimitive)) -> value vc_request { tc_ac.stop; - v_resourceIndex := f_processCreateRequestPrimitive(vc_request.primitive.requestPrimitive); + v_resourceIndex := f_processCreateRequestPrimitive(vc_request.primitive.requestPrimitive); f_send(e_mcaPortIn, m_response(vc_response.primitive.responsePrimitive)); if(f_checkNodeLink(vc_request.primitive.requestPrimitive.primitiveContent, f_getResourceAddress(v_resourceIndexNode))) { @@ -1195,8 +1195,8 @@ module OneM2M_PermutationFunctions { } [] mcaPortIn.receive(mw_request(v_requestPrimitiveNode)) -> value vc_request { tc_ac.stop; - v_resourceIndexNode := f_processCreateRequestPrimitive(vc_request.primitive.requestPrimitive); - v_nodeCreated := true; + v_resourceIndexNode := f_processCreateRequestPrimitive(vc_request.primitive.requestPrimitive); + v_nodeCreated := true; //Set deviceInfo parent v_requestPrimitiveDeviceInfo.to_ := f_getResourceAddress(v_resourceIndexNode); f_send(e_mcaPortIn, m_response(vc_response.primitive.responsePrimitive)); @@ -1206,7 +1206,7 @@ module OneM2M_PermutationFunctions { [v_nodeCreated] mcaPortIn.receive(mw_request(v_requestPrimitiveDeviceInfo)) -> value vc_request { tc_ac.stop; v_resourceIndexDeviceInfo := f_processCreateRequestPrimitive(vc_request.primitive.requestPrimitive); - v_deviceInfoCreated := true; + v_deviceInfoCreated := true; f_send(e_mcaPortIn, m_response(vc_response.primitive.responsePrimitive)); tc_ac.start; repeat; @@ -1214,10 +1214,10 @@ module OneM2M_PermutationFunctions { [] mcaPortIn.receive(mw_request(mw_create)) -> value vc_request { tc_ac.stop; //Send Response - v_resourceIndex := f_processCreateRequestPrimitive(vc_request.primitive.requestPrimitive); + v_resourceIndex := f_processCreateRequestPrimitive(vc_request.primitive.requestPrimitive); f_send(e_mcaPortIn, m_response(vc_response.primitive.responsePrimitive)); tc_ac.start; - repeat; + repeat; } [] tc_ac.timeout{ setverdict(fail, __SCOPE__ & " : Timeout due to no required request received from SUT"); @@ -1226,11 +1226,11 @@ module OneM2M_PermutationFunctions { // Postamble f_cf03Down(); - } + } function f_AE_HAIM_CRE_004(in universal charstring p_action, in template UtTriggerPrimitive p_utRequest, in template RequestPrimitive p_requestPrimitive1, in template RequestPrimitive p_requestPrimitive2) runs on CseSimu system AeSystem { - var integer v_resourceIndex := -1; + var integer v_resourceIndex := -1; var integer v_parentResourceIndex := -1; //Test component configuration @@ -1253,13 +1253,13 @@ module OneM2M_PermutationFunctions { [] mcaPortIn.receive(mw_request(p_requestPrimitive2)) -> value vc_request { tc_ac.stop; setverdict(pass, __SCOPE__ & " : Module class creation request contains required Properties"); - v_resourceIndex := f_processCreateRequestPrimitive(vc_request.primitive.requestPrimitive); + v_resourceIndex := f_processCreateRequestPrimitive(vc_request.primitive.requestPrimitive); f_send(e_mcaPortIn, m_response(vc_response.primitive.responsePrimitive)); } [] mcaPortIn.receive(mw_request(mw_create)) -> value vc_request { tc_ac.stop; //Send response - v_resourceIndex := f_processCreateRequestPrimitive(vc_request.primitive.requestPrimitive); + v_resourceIndex := f_processCreateRequestPrimitive(vc_request.primitive.requestPrimitive); f_send(e_mcaPortIn, m_response(vc_response.primitive.responsePrimitive)); tc_ac.start; repeat; @@ -1271,11 +1271,11 @@ module OneM2M_PermutationFunctions { // Postamble f_cf03Down(); - } + } function f_AE_HAIM_CRE_005(in universal charstring p_action, in template UtTriggerPrimitive p_utRequest, in template RequestPrimitive p_requestPrimitive1, in template RequestPrimitive p_requestPrimitive2) runs on CseSimu system AeSystem { - var integer v_resourceIndex := -1; + var integer v_resourceIndex := -1; var integer v_parentResourceIndex := -1; //Test component configuration @@ -1290,7 +1290,7 @@ module OneM2M_PermutationFunctions { v_parentResourceIndex := f_ae_createResourceHandler(p_requestPrimitive1); //Set module class parentID - p_requestPrimitive2.to_ := f_getResourceAddress(v_parentResourceIndex); + p_requestPrimitive2.to_ := f_getResourceAddress(v_parentResourceIndex); //Test behavior tc_ac.start; @@ -1298,13 +1298,13 @@ module OneM2M_PermutationFunctions { [] mcaPortIn.receive(mw_request(p_requestPrimitive2)) -> value vc_request { tc_ac.stop; setverdict(pass, __SCOPE__ & " : Module class creation request contains required DataPoints"); - v_resourceIndex := f_processCreateRequestPrimitive(vc_request.primitive.requestPrimitive); + v_resourceIndex := f_processCreateRequestPrimitive(vc_request.primitive.requestPrimitive); f_send(e_mcaPortIn, m_response(vc_response.primitive.responsePrimitive)); } [] mcaPortIn.receive(mw_request(mw_create)) -> value vc_request { tc_ac.stop; //Send response - v_resourceIndex := f_processCreateRequestPrimitive(vc_request.primitive.requestPrimitive); + v_resourceIndex := f_processCreateRequestPrimitive(vc_request.primitive.requestPrimitive); f_send(e_mcaPortIn, m_response(vc_response.primitive.responsePrimitive)); tc_ac.start; repeat; @@ -1316,7 +1316,7 @@ module OneM2M_PermutationFunctions { // Postamble f_cf03Down(); - } + } }//end group Create @@ -1332,1000 +1332,1000 @@ module OneM2M_PermutationFunctions { group Create { - function f_CSE_GEN_CRE_001(in PrimitiveScope p_primitiveScope) runs on AeSimu system CseSystem { + function f_CSE_GEN_CRE_001(in PrimitiveScope p_primitiveScope) runs on AeSimu system CseSystem { - // Local variables - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var AddressingMethod v_addressingMethod; - var PrimitiveScope v_primitiveScope; + // Local variables + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var AddressingMethod v_addressingMethod; + var PrimitiveScope v_primitiveScope; - // Test control - if(not(PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { - setverdict(inconc, __SCOPE__ & ": Unstructured-CSE-Relative-Resource-ID format support is required to run this test case"); - stop; - } + // Test control + if(not(PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { + setverdict(inconc, __SCOPE__ & ": Unstructured-CSE-Relative-Resource-ID format support is required to run this test case"); + stop; + } - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); - // Test Body - //Force usage of Non-Hierarchical addressing method - v_addressingMethod := e_nonHierarchical; - v_primitiveScope := p_primitiveScope; - v_request := f_getCreateRequestPrimitive(int3, m_createContainerBase, v_resourceIndex); - v_request.to_ := f_getResourceAddress(v_resourceIndex, v_addressingMethod, v_primitiveScope); + // Test Body + //Force usage of Non-Hierarchical addressing method + v_addressingMethod := e_nonHierarchical; + v_primitiveScope := p_primitiveScope; + v_request := f_getCreateRequestPrimitive(int3, m_createContainerBase, v_resourceIndex); + v_request.to_ := f_getResourceAddress(v_resourceIndex, v_addressingMethod, v_primitiveScope); - f_send(e_mcaPort, m_request(v_request)); + f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Container resource created using non-hierarchical addressing method"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while creating container resource using non-hierarchical addressing method"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating resource"); - } - } + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Container resource created using non-hierarchical addressing method"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while creating container resource using non-hierarchical addressing method"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_GEN_CRE_001 + }//end f_CSE_GEN_CRE_001 - function f_CSE_GEN_CRE_002(in PrimitiveScope p_primitiveScope) runs on AeSimu system CseSystem { + function f_CSE_GEN_CRE_002(in PrimitiveScope p_primitiveScope) runs on AeSimu system CseSystem { - // Local variables - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var AddressingMethod v_addressingMethod; - var PrimitiveScope v_primitiveScope; + // Local variables + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var AddressingMethod v_addressingMethod; + var PrimitiveScope v_primitiveScope; - // Test control - if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { - setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); - stop; - } + // Test control + if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { + setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); + stop; + } - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); - // Test Body - //Force usage of Hierarchical addressing method - v_addressingMethod := e_hierarchical; - v_primitiveScope := p_primitiveScope; - v_request := f_getCreateRequestPrimitive(int3, m_createContainerBase, v_resourceIndex); - v_request.to_ := f_getResourceAddress(v_resourceIndex, v_addressingMethod, v_primitiveScope); + // Test Body + //Force usage of Hierarchical addressing method + v_addressingMethod := e_hierarchical; + v_primitiveScope := p_primitiveScope; + v_request := f_getCreateRequestPrimitive(int3, m_createContainerBase, v_resourceIndex); + v_request.to_ := f_getResourceAddress(v_resourceIndex, v_addressingMethod, v_primitiveScope); - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Container resource created using hierarchical addressing method"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while creating container resource using hierarchical addressing method"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating resource"); - } - } + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Container resource created using hierarchical addressing method"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while creating container resource using hierarchical addressing method"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_GEN_CRE_002 + }//end f_CSE_GEN_CRE_002 - function f_CSE_GEN_CRE_003(in PrimitiveScope p_primitiveScope) runs on AeSimu system CseSystem { + function f_CSE_GEN_CRE_003(in PrimitiveScope p_primitiveScope) runs on AeSimu system CseSystem { - // Local variables - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var AddressingMethod v_addressingMethod; - var PrimitiveScope v_primitiveScope; - var XSD.ID v_cseName := PX_CSE_NAME; + // Local variables + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var AddressingMethod v_addressingMethod; + var PrimitiveScope v_primitiveScope; + var XSD.ID v_cseName := PX_CSE_NAME; - // Test control - if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { - setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); - stop; - } + // Test control + if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { + setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); + stop; + } - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); - // Test Body - //Force usage of Non-Hierarchical addressing method - v_addressingMethod := e_hierarchical; - v_primitiveScope := p_primitiveScope; - v_request := f_getCreateRequestPrimitive(int3, m_createContainerBase, v_resourceIndex); - v_request.to_ := f_useShortcutInResourceId(f_getResourceAddress(v_resourceIndex, v_addressingMethod, v_primitiveScope)); + // Test Body + //Force usage of Non-Hierarchical addressing method + v_addressingMethod := e_hierarchical; + v_primitiveScope := p_primitiveScope; + v_request := f_getCreateRequestPrimitive(int3, m_createContainerBase, v_resourceIndex); + v_request.to_ := f_useShortcutInResourceId(f_getResourceAddress(v_resourceIndex, v_addressingMethod, v_primitiveScope)); - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Container resource created using shortcut in hierarchical addressing method"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while creating container resource using shortcut in hierarchical addressing method"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating resource"); - } - } + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Container resource created using shortcut in hierarchical addressing method"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while creating container resource using shortcut in hierarchical addressing method"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_GEN_CRE_003 + }//end f_CSE_GEN_CRE_003 - function f_CSE_GEN_CRE_004(in PrimitiveScope p_primitiveScope) runs on AeSimu system CseSystem { + function f_CSE_GEN_CRE_004(in PrimitiveScope p_primitiveScope) runs on AeSimu system CseSystem { - // Local variables - var RequestPrimitive v_request; - var template RequestPrimitive v_groupRequest := m_createGroupBase; - var integer v_aeIndex := -1; - var integer v_groupIndex := -1; - var integer v_resourceIndex := -1; - var AddressingMethod v_addressingMethod; + // Local variables + var RequestPrimitive v_request; + var template RequestPrimitive v_groupRequest := m_createGroupBase; + var integer v_aeIndex := -1; + var integer v_groupIndex := -1; + var integer v_resourceIndex := -1; + var AddressingMethod v_addressingMethod; - // Test control - if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { - setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); - stop; - } + // Test control + if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { + setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); + stop; + } - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); - v_groupRequest.primitiveContent.group_.memberIDs := {f_getResourceId(vc_resourcesList[v_resourceIndex].resource)}; + v_groupRequest.primitiveContent.group_.memberIDs := {f_getResourceId(vc_resourcesList[v_resourceIndex].resource)}; - v_groupIndex := f_cse_createResource(int9, v_groupRequest, v_aeIndex); + v_groupIndex := f_cse_createResource(int9, v_groupRequest, v_aeIndex); - // Test Body - v_request := f_getCreateRequestPrimitive(int3, m_createContainerBase, v_aeIndex); - //Force usage of Hybrid Hierarchical addressing method - v_addressingMethod := e_nonHierarchical; - v_request.to_ := f_getResourceAddress(v_groupIndex, v_addressingMethod, p_primitiveScope); - v_request.to_ := v_request.to_ & "/fopt"; + // Test Body + v_request := f_getCreateRequestPrimitive(int3, m_createContainerBase, v_aeIndex); + //Force usage of Hybrid Hierarchical addressing method + v_addressingMethod := e_nonHierarchical; + v_request.to_ := f_getResourceAddress(v_groupIndex, v_addressingMethod, p_primitiveScope); + v_request.to_ := v_request.to_ & "/fopt"; - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value vc_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Fanout operation performed successfully by using hybrid addressing"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while creating container resource using hierarchical addressing method"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating resource"); - } - } + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Fanout operation performed successfully by using hybrid addressing"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while creating container resource using hierarchical addressing method"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_GEN_CRE_004 + }//end f_CSE_GEN_CRE_004 } // end of group Create group Retrieve { - function f_CSE_GEN_RET_001(in PrimitiveScope p_primitiveScope) runs on AeSimu system CseSystem { + function f_CSE_GEN_RET_001(in PrimitiveScope p_primitiveScope) runs on AeSimu system CseSystem { - // Local variables - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var AddressingMethod v_addressingMethod; - var PrimitiveScope v_primitiveScope; + // Local variables + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var AddressingMethod v_addressingMethod; + var PrimitiveScope v_primitiveScope; - // Test control - if(not(PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { - setverdict(inconc, __SCOPE__ & ": Unstructured-CSE-Relative-Resource-ID format support is required to run this test case"); - stop; - } + // Test control + if(not(PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { + setverdict(inconc, __SCOPE__ & ": Unstructured-CSE-Relative-Resource-ID format support is required to run this test case"); + stop; + } - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); - // Test Body - //Force usage of Non-Hierarchical addressing method - v_addressingMethod := e_nonHierarchical; - v_primitiveScope := p_primitiveScope; + // Test Body + //Force usage of Non-Hierarchical addressing method + v_addressingMethod := e_nonHierarchical; + v_primitiveScope := p_primitiveScope; - f_send(e_mcaPort, m_request(m_retrieve(f_getResourceAddress(v_resourceIndex, v_addressingMethod, v_primitiveScope), f_getOriginator(v_resourceIndex)))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Container resource retrieved using non-hierarchical addressing method"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while retrieving container resource using non-hierarchical addressing method"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); - } - } - - // Postamble - f_cse_postamble_deleteResources(); - - // Tear down - f_cf01Down(); - - }//end f_CSE_GEN_RET_001 - - function f_CSE_GEN_RET_002(in PrimitiveScope p_primitiveScope) runs on AeSimu system CseSystem { - - // Local variables - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var AddressingMethod v_addressingMethod; - var PrimitiveScope v_primitiveScope; - - // Test control - if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { - setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); - stop; + f_send(e_mcaPort, m_request(m_retrieve(f_getResourceAddress(v_resourceIndex, v_addressingMethod, v_primitiveScope), f_getOriginator(v_resourceIndex)))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Container resource retrieved using non-hierarchical addressing method"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while retrieving container resource using non-hierarchical addressing method"); } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); - // Test component configuration - f_cf01Up(); + }//end f_CSE_GEN_RET_001 + + function f_CSE_GEN_RET_002(in PrimitiveScope p_primitiveScope) runs on AeSimu system CseSystem { - // Test adapter configuration + // Local variables + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var AddressingMethod v_addressingMethod; + var PrimitiveScope v_primitiveScope; + + // Test control + if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { + setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); + stop; + } - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); - // Test Body - //Force usage of Hierarchical addressing method - v_addressingMethod := e_hierarchical; - v_primitiveScope := p_primitiveScope; + // Test Body + //Force usage of Hierarchical addressing method + v_addressingMethod := e_hierarchical; + v_primitiveScope := p_primitiveScope; - f_send(e_mcaPort, m_request(m_retrieve(f_getResourceAddress(v_resourceIndex, v_addressingMethod, v_primitiveScope), f_getOriginator(v_resourceIndex)))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Container resource retrieved using hierarchical addressing method"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while retrieving container resource using hierarchical addressing method"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); - } - } + f_send(e_mcaPort, m_request(m_retrieve(f_getResourceAddress(v_resourceIndex, v_addressingMethod, v_primitiveScope), f_getOriginator(v_resourceIndex)))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Container resource retrieved using hierarchical addressing method"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while retrieving container resource using hierarchical addressing method"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_GEN_RET_002 + }//end f_CSE_GEN_RET_002 - function f_CSE_GEN_RET_003(in PrimitiveScope p_primitiveScope) runs on AeSimu system CseSystem { + function f_CSE_GEN_RET_003(in PrimitiveScope p_primitiveScope) runs on AeSimu system CseSystem { - // Local variables - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var AddressingMethod v_addressingMethod; - var PrimitiveScope v_primitiveScope; + // Local variables + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var AddressingMethod v_addressingMethod; + var PrimitiveScope v_primitiveScope; - // Test control - if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { - setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); - stop; - } + // Test control + if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { + setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); + stop; + } - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); - // Test Body - //Force usage of Non-Hierarchical addressing method - v_addressingMethod := e_hierarchical; - v_primitiveScope := p_primitiveScope; + // Test Body + //Force usage of Non-Hierarchical addressing method + v_addressingMethod := e_hierarchical; + v_primitiveScope := p_primitiveScope; - f_send(e_mcaPort, m_request(m_retrieve(f_useShortcutInResourceId(f_getResourceAddress(v_resourceIndex, v_addressingMethod, v_primitiveScope)), f_getOriginator(v_resourceIndex)))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Container resource retrieved using shortcut in hierarchical addressing method"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while retrieving container resource using shortcut in hierarchical addressing method"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); - } - } + f_send(e_mcaPort, m_request(m_retrieve(f_useShortcutInResourceId(f_getResourceAddress(v_resourceIndex, v_addressingMethod, v_primitiveScope)), f_getOriginator(v_resourceIndex)))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Container resource retrieved using shortcut in hierarchical addressing method"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while retrieving container resource using shortcut in hierarchical addressing method"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_GEN_RET_003 + }//end f_CSE_GEN_RET_003 - function f_CSE_GEN_RET_004(in PrimitiveScope p_primitiveScope) runs on AeSimu system CseSystem { + function f_CSE_GEN_RET_004(in PrimitiveScope p_primitiveScope) runs on AeSimu system CseSystem { - // Local variables - var integer v_aeIndex := -1; - var integer v_groupIndex := -1; - var integer v_resourceIndex := -1; - var AddressingMethod v_addressingMethod; - var RequestPrimitive v_request; - var template RequestPrimitive v_groupRequest := m_createGroupBase; + // Local variables + var integer v_aeIndex := -1; + var integer v_groupIndex := -1; + var integer v_resourceIndex := -1; + var AddressingMethod v_addressingMethod; + var RequestPrimitive v_request; + var template RequestPrimitive v_groupRequest := m_createGroupBase; - // Test control - if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { - setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); - stop; - } + // Test control + if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { + setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); + stop; + } - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); - v_groupRequest.primitiveContent.group_.memberIDs := {f_getResourceId(vc_resourcesList[v_resourceIndex].resource)}; + v_groupRequest.primitiveContent.group_.memberIDs := {f_getResourceId(vc_resourcesList[v_resourceIndex].resource)}; - v_groupIndex := f_cse_createResource(int9, v_groupRequest, v_aeIndex); + v_groupIndex := f_cse_createResource(int9, v_groupRequest, v_aeIndex); - // Test Body - //Force usage of Hybrid Hierarchical addressing method - v_addressingMethod := e_nonHierarchical; - v_request := valueof(m_retrieve(f_getResourceAddress(v_groupIndex, v_addressingMethod, p_primitiveScope), f_getOriginator(v_groupIndex))); - v_request.to_ := v_request.to_ & "/fopt"; + // Test Body + //Force usage of Hybrid Hierarchical addressing method + v_addressingMethod := e_nonHierarchical; + v_request := valueof(m_retrieve(f_getResourceAddress(v_groupIndex, v_addressingMethod, p_primitiveScope), f_getOriginator(v_groupIndex))); + v_request.to_ := v_request.to_ & "/fopt"; - f_send(e_mcaPort, m_request(valueof(v_request))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value vc_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Fanout operation performed successfully by using hybrid addressing"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while creating container resource using hierarchical addressing method"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating resource"); - } - } + f_send(e_mcaPort, m_request(valueof(v_request))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Fanout operation performed successfully by using hybrid addressing"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while creating container resource using hierarchical addressing method"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_GEN_RET_004 + }//end f_CSE_GEN_RET_004 } // end of group Retrieve group Update { - function f_CSE_GEN_UPD_001(in PrimitiveScope p_primitiveScope) runs on AeSimu system CseSystem { + function f_CSE_GEN_UPD_001(in PrimitiveScope p_primitiveScope) runs on AeSimu system CseSystem { - // Local variables - var RequestPrimitive v_updateRequest := valueof(m_updateContainerBase); - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var AddressingMethod v_addressingMethod; - var PrimitiveScope v_primitiveScope; + // Local variables + var RequestPrimitive v_updateRequest := valueof(m_updateContainerBase); + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var AddressingMethod v_addressingMethod; + var PrimitiveScope v_primitiveScope; - // Test control - if(not(PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { - setverdict(inconc, __SCOPE__ & ": Unstructured-CSE-Relative-Resource-ID format support is required to run this test case"); - stop; - } + // Test control + if(not(PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { + setverdict(inconc, __SCOPE__ & ": Unstructured-CSE-Relative-Resource-ID format support is required to run this test case"); + stop; + } - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); - // Test Body - //Force usage of Non-Hierarchical addressing method - v_addressingMethod := e_nonHierarchical; - v_primitiveScope := p_primitiveScope; + // Test Body + //Force usage of Non-Hierarchical addressing method + v_addressingMethod := e_nonHierarchical; + v_primitiveScope := p_primitiveScope; - v_updateRequest.primitiveContent.container.labels := {"MyLabel"}; + v_updateRequest.primitiveContent.container.labels := {"MyLabel"}; - v_updateRequest := f_getUpdateRequestPrimitive(int3, v_resourceIndex, v_updateRequest); - v_updateRequest.to_ := f_getResourceAddress(v_resourceIndex, v_addressingMethod, v_primitiveScope); + v_updateRequest := f_getUpdateRequestPrimitive(int3, v_resourceIndex, v_updateRequest); + v_updateRequest.to_ := f_getResourceAddress(v_resourceIndex, v_addressingMethod, v_primitiveScope); - f_send(e_mcaPort, m_request(v_updateRequest)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Container resource updated using non-hierarchical addressing method"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while updating container resource using non-hierarchical addressing method"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while updating resource"); - } - } + f_send(e_mcaPort, m_request(v_updateRequest)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Container resource updated using non-hierarchical addressing method"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while updating container resource using non-hierarchical addressing method"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while updating resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_GEN_UPD_001 + }//end f_CSE_GEN_UPD_001 - function f_CSE_GEN_UPD_002(in PrimitiveScope p_primitiveScope) runs on AeSimu system CseSystem { + function f_CSE_GEN_UPD_002(in PrimitiveScope p_primitiveScope) runs on AeSimu system CseSystem { - // Local variables - var RequestPrimitive v_updateRequest := valueof(m_updateContainerBase); - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var AddressingMethod v_addressingMethod; - var PrimitiveScope v_primitiveScope; + // Local variables + var RequestPrimitive v_updateRequest := valueof(m_updateContainerBase); + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var AddressingMethod v_addressingMethod; + var PrimitiveScope v_primitiveScope; - // Test control - if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { - setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); - stop; - } + // Test control + if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { + setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); + stop; + } - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); - // Test Body - //Force usage of Hierarchical addressing method - v_addressingMethod := e_hierarchical; - v_primitiveScope := p_primitiveScope; + // Test Body + //Force usage of Hierarchical addressing method + v_addressingMethod := e_hierarchical; + v_primitiveScope := p_primitiveScope; - v_updateRequest.primitiveContent.container.labels := {"MyLabel"}; + v_updateRequest.primitiveContent.container.labels := {"MyLabel"}; - v_updateRequest := f_getUpdateRequestPrimitive(int3, v_resourceIndex, v_updateRequest); - v_updateRequest.to_ := f_getResourceAddress(v_resourceIndex, v_addressingMethod, v_primitiveScope); + v_updateRequest := f_getUpdateRequestPrimitive(int3, v_resourceIndex, v_updateRequest); + v_updateRequest.to_ := f_getResourceAddress(v_resourceIndex, v_addressingMethod, v_primitiveScope); - f_send(e_mcaPort, m_request(v_updateRequest)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Container resource updated using hierarchical addressing method"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while updating container resource using hierarchical addressing method"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while updating resource"); - } - } + f_send(e_mcaPort, m_request(v_updateRequest)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Container resource updated using hierarchical addressing method"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while updating container resource using hierarchical addressing method"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while updating resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_GEN_UPD_002 + }//end f_CSE_GEN_UPD_002 - function f_CSE_GEN_UPD_003(in PrimitiveScope p_primitiveScope) runs on AeSimu system CseSystem { + function f_CSE_GEN_UPD_003(in PrimitiveScope p_primitiveScope) runs on AeSimu system CseSystem { - // Local variables - var RequestPrimitive v_updateRequest := valueof(m_updateContainerBase); - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var AddressingMethod v_addressingMethod; - var PrimitiveScope v_primitiveScope; + // Local variables + var RequestPrimitive v_updateRequest := valueof(m_updateContainerBase); + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var AddressingMethod v_addressingMethod; + var PrimitiveScope v_primitiveScope; - // Test control - if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { - setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); - stop; - } + // Test control + if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { + setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); + stop; + } - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); - // Test Body - //Force usage of Non-Hierarchical addressing method - v_addressingMethod := e_hierarchical; - v_primitiveScope := p_primitiveScope; + // Test Body + //Force usage of Non-Hierarchical addressing method + v_addressingMethod := e_hierarchical; + v_primitiveScope := p_primitiveScope; - v_updateRequest.primitiveContent.container.labels := {"MyLabel"}; + v_updateRequest.primitiveContent.container.labels := {"MyLabel"}; - v_updateRequest := f_getUpdateRequestPrimitive(int3, v_resourceIndex, v_updateRequest); - v_updateRequest.to_ := f_useShortcutInResourceId(f_getResourceAddress(v_resourceIndex, v_addressingMethod, v_primitiveScope)); + v_updateRequest := f_getUpdateRequestPrimitive(int3, v_resourceIndex, v_updateRequest); + v_updateRequest.to_ := f_useShortcutInResourceId(f_getResourceAddress(v_resourceIndex, v_addressingMethod, v_primitiveScope)); - f_send(e_mcaPort, m_request(v_updateRequest)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Container resource updated using shortcut in hierarchical addressing method"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while updating container resource using shortcut in hierarchical addressing method"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while updating resource"); - } - } + f_send(e_mcaPort, m_request(v_updateRequest)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Container resource updated using shortcut in hierarchical addressing method"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while updating container resource using shortcut in hierarchical addressing method"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while updating resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_GEN_UPD_003 + }//end f_CSE_GEN_UPD_003 - function f_CSE_GEN_UPD_004(in PrimitiveScope p_primitiveScope) runs on AeSimu system CseSystem { + function f_CSE_GEN_UPD_004(in PrimitiveScope p_primitiveScope) runs on AeSimu system CseSystem { - // Local variables - var template RequestPrimitive v_groupRequest := m_createGroupBase; - var RequestPrimitive v_updateRequest := valueof(m_updateContainerBase); - var integer v_aeIndex := -1; - var integer v_groupIndex := -1; - var integer v_resourceIndex := -1; - var AddressingMethod v_addressingMethod; + // Local variables + var template RequestPrimitive v_groupRequest := m_createGroupBase; + var RequestPrimitive v_updateRequest := valueof(m_updateContainerBase); + var integer v_aeIndex := -1; + var integer v_groupIndex := -1; + var integer v_resourceIndex := -1; + var AddressingMethod v_addressingMethod; - // Test control - if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { - setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); - stop; - } + // Test control + if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { + setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); + stop; + } - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); - v_groupRequest.primitiveContent.group_.memberIDs := {f_getResourceId(vc_resourcesList[v_resourceIndex].resource)}; + v_groupRequest.primitiveContent.group_.memberIDs := {f_getResourceId(vc_resourcesList[v_resourceIndex].resource)}; - v_groupIndex := f_cse_createResource(int9, v_groupRequest, v_aeIndex); + v_groupIndex := f_cse_createResource(int9, v_groupRequest, v_aeIndex); - // Test Body - v_updateRequest := f_getUpdateRequestPrimitive(int9, v_groupIndex, v_updateRequest); - v_updateRequest.primitiveContent.container.labels := {"MyLabel"}; - //Force usage of Hybrid Hierarchical addressing method - v_addressingMethod := e_nonHierarchical; - v_updateRequest.to_ := f_getResourceAddress(v_groupIndex, v_addressingMethod, p_primitiveScope); - v_updateRequest.to_ := v_updateRequest.to_ & "/fopt"; + // Test Body + v_updateRequest := f_getUpdateRequestPrimitive(int9, v_groupIndex, v_updateRequest); + v_updateRequest.primitiveContent.container.labels := {"MyLabel"}; + //Force usage of Hybrid Hierarchical addressing method + v_addressingMethod := e_nonHierarchical; + v_updateRequest.to_ := f_getResourceAddress(v_groupIndex, v_addressingMethod, p_primitiveScope); + v_updateRequest.to_ := v_updateRequest.to_ & "/fopt"; - f_send(e_mcaPort, m_request(v_updateRequest)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value vc_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Fanout operation performed successfully by using hybrid addressing"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while creating container resource using hierarchical addressing method"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating resource"); - } - } + f_send(e_mcaPort, m_request(v_updateRequest)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Fanout operation performed successfully by using hybrid addressing"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while creating container resource using hierarchical addressing method"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_GEN_UPD_004 + }//end f_CSE_GEN_UPD_004 } // end of group Update group Delete { - function f_CSE_GEN_DEL_001(in PrimitiveScope p_primitiveScope) runs on AeSimu system CseSystem { + function f_CSE_GEN_DEL_001(in PrimitiveScope p_primitiveScope) runs on AeSimu system CseSystem { - // Local variables - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var AddressingMethod v_addressingMethod; - var PrimitiveScope v_primitiveScope; + // Local variables + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var AddressingMethod v_addressingMethod; + var PrimitiveScope v_primitiveScope; - // Test control - if(not(PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { - setverdict(inconc, __SCOPE__ & ": Unstructured-CSE-Relative-Resource-ID format support is required to run this test case"); - stop; - } + // Test control + if(not(PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { + setverdict(inconc, __SCOPE__ & ": Unstructured-CSE-Relative-Resource-ID format support is required to run this test case"); + stop; + } - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); - // Test Body - //Force usage of Non-Hierarchical addressing method - v_addressingMethod := e_nonHierarchical; - v_primitiveScope := p_primitiveScope; + // Test Body + //Force usage of Non-Hierarchical addressing method + v_addressingMethod := e_nonHierarchical; + v_primitiveScope := p_primitiveScope; - v_request := valueof(m_delete(f_getResourceAddress(v_resourceIndex, v_addressingMethod, v_primitiveScope), f_getOriginator(v_resourceIndex))); + v_request := valueof(m_delete(f_getResourceAddress(v_resourceIndex, v_addressingMethod, v_primitiveScope), f_getOriginator(v_resourceIndex))); - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2002))) { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Container resource deleted using non-hierarchical addressing method"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while deleting container resource using non-hierarchical addressing method"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while deleting resource"); - } - } + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2002))) { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Container resource deleted using non-hierarchical addressing method"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while deleting container resource using non-hierarchical addressing method"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while deleting resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_GEN_DEL_001 + }//end f_CSE_GEN_DEL_001 - function f_CSE_GEN_DEL_002(in PrimitiveScope p_primitiveScope) runs on AeSimu system CseSystem { + function f_CSE_GEN_DEL_002(in PrimitiveScope p_primitiveScope) runs on AeSimu system CseSystem { - // Local variables - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var AddressingMethod v_addressingMethod; - var PrimitiveScope v_primitiveScope; + // Local variables + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var AddressingMethod v_addressingMethod; + var PrimitiveScope v_primitiveScope; - // Test control - if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { - setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); - stop; - } - - // Test component configuration - f_cf01Up(); + // Test control + if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { + setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); + stop; + } - // Test adapter configuration + // Test component configuration + f_cf01Up(); - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); - // Test Body - //Force usage of Hierarchical addressing method - v_addressingMethod := e_hierarchical; - v_primitiveScope := p_primitiveScope; + // Test Body + //Force usage of Hierarchical addressing method + v_addressingMethod := e_hierarchical; + v_primitiveScope := p_primitiveScope; - v_request := valueof(m_delete(f_getResourceAddress(v_resourceIndex, v_addressingMethod, v_primitiveScope), f_getOriginator(v_resourceIndex))); + v_request := valueof(m_delete(f_getResourceAddress(v_resourceIndex, v_addressingMethod, v_primitiveScope), f_getOriginator(v_resourceIndex))); - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2002))) { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Container resource deleted using hierarchical addressing method"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while deleting container resource using hierarchical addressing method"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while deleting resource"); - } - } + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2002))) { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Container resource deleted using hierarchical addressing method"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while deleting container resource using hierarchical addressing method"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while deleting resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_GEN_DEL_002 + }//end f_CSE_GEN_DEL_002 - function f_CSE_GEN_DEL_003(in PrimitiveScope p_primitiveScope) runs on AeSimu system CseSystem { + function f_CSE_GEN_DEL_003(in PrimitiveScope p_primitiveScope) runs on AeSimu system CseSystem { - // Local variables - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var AddressingMethod v_addressingMethod; - var PrimitiveScope v_primitiveScope; + // Local variables + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var AddressingMethod v_addressingMethod; + var PrimitiveScope v_primitiveScope; - // Test control - if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { - setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); - stop; - } + // Test control + if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { + setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); + stop; + } - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); - // Test Body - //Force usage of Non-Hierarchical addressing method - v_addressingMethod := e_hierarchical; - v_primitiveScope := p_primitiveScope; + // Test Body + //Force usage of Non-Hierarchical addressing method + v_addressingMethod := e_hierarchical; + v_primitiveScope := p_primitiveScope; - v_request := valueof(m_delete(f_useShortcutInResourceId(f_getResourceAddress(v_resourceIndex, v_addressingMethod, v_primitiveScope)), f_getOriginator(v_resourceIndex))); + v_request := valueof(m_delete(f_useShortcutInResourceId(f_getResourceAddress(v_resourceIndex, v_addressingMethod, v_primitiveScope)), f_getOriginator(v_resourceIndex))); - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2002))) { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Container resource deleted using shortcut in hierarchical addressing method"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while deleting container resource using shortcut in hierarchical addressing method"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while deleting resource"); - } - } + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2002))) { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Container resource deleted using shortcut in hierarchical addressing method"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while deleting container resource using shortcut in hierarchical addressing method"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while deleting resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_GEN_DEL_003 + }//end f_CSE_GEN_DEL_003 - function f_CSE_GEN_DEL_004(in PrimitiveScope p_primitiveScope) runs on AeSimu system CseSystem { + function f_CSE_GEN_DEL_004(in PrimitiveScope p_primitiveScope) runs on AeSimu system CseSystem { - // Local variables - var RequestPrimitive v_request; - var template RequestPrimitive v_groupRequest := m_createGroupBase; - var integer v_aeIndex := -1; - var integer v_groupIndex := -1; - var integer v_resourceIndex := -1; - var AddressingMethod v_addressingMethod; + // Local variables + var RequestPrimitive v_request; + var template RequestPrimitive v_groupRequest := m_createGroupBase; + var integer v_aeIndex := -1; + var integer v_groupIndex := -1; + var integer v_resourceIndex := -1; + var AddressingMethod v_addressingMethod; - // Test control - if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { - setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); - stop; - } + // Test control + if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) { + setverdict(inconc, __SCOPE__ & ": Structured-CSE-Relative-Resource-ID format support is required to run this test case"); + stop; + } - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); - v_groupRequest.primitiveContent.group_.memberIDs := {f_getResourceId(vc_resourcesList[v_resourceIndex].resource)}; + v_groupRequest.primitiveContent.group_.memberIDs := {f_getResourceId(vc_resourcesList[v_resourceIndex].resource)}; - v_groupIndex := f_cse_createResource(int9, v_groupRequest, v_aeIndex); + v_groupIndex := f_cse_createResource(int9, v_groupRequest, v_aeIndex); - // Test Body - //Force usage of Hybrid Hierarchical addressing method - v_addressingMethod := e_nonHierarchical; - v_request := valueof(m_delete(f_getResourceAddress(v_groupIndex, v_addressingMethod, p_primitiveScope), f_getOriginator(v_resourceIndex))); - v_request.to_ := v_request.to_ & "/fopt"; + // Test Body + //Force usage of Hybrid Hierarchical addressing method + v_addressingMethod := e_nonHierarchical; + v_request := valueof(m_delete(f_getResourceAddress(v_groupIndex, v_addressingMethod, p_primitiveScope), f_getOriginator(v_resourceIndex))); + v_request.to_ := v_request.to_ & "/fopt"; - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value vc_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Fanout operation performed successfully by using hybrid addressing"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while creating container resource using hierarchical addressing method"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating resource"); - } - } + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Fanout operation performed successfully by using hybrid addressing"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while creating container resource using hierarchical addressing method"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_GEN_DEL_004 + }//end f_CSE_GEN_DEL_004 } // end of group Delete @@ -2359,7 +2359,7 @@ module OneM2M_PermutationFunctions { f_sleepIgnoreDef(PX_TCONFIG_IUT); //Test Body - v_request := valueof(m_createAe(vc_aeSimuDesc.appId, omit, PX_CSE_ID & "/" & p_aeIdStem)); + v_request := valueof(m_createAe(vc_aeSimuDesc.appId, omit, PX_CSE_ID & "/" & p_aeIdStem)); v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, -1); @@ -2381,7 +2381,7 @@ module OneM2M_PermutationFunctions { [] tc_ac.timeout { setverdict(fail, __SCOPE__ & ": No answer while creating AE"); } - } + } // Postamble f_cse_postamble_deleteResources(); @@ -2412,7 +2412,7 @@ module OneM2M_PermutationFunctions { //Preamble //Test Body - v_request := valueof(m_createAe(vc_aeSimuDesc.appId, omit, v_aeIdStem)); + v_request := valueof(m_createAe(vc_aeSimuDesc.appId, omit, v_aeIdStem)); v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, -1); @@ -2433,7 +2433,7 @@ module OneM2M_PermutationFunctions { [] tc_ac.timeout { setverdict(fail, __SCOPE__ & ": No answer while creating AE"); } - } + } // Postamble f_cse_postamble_deleteResources(); @@ -2445,476 +2445,476 @@ module OneM2M_PermutationFunctions { function f_CSE_REG_CRE_012(in template RequestPrimitive p_createAe) runs on AeSimu system CseSystem { - //Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var ResourceType v_resourceType := int2; //AE + //Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var ResourceType v_resourceType := int2; //AE - // Test control + // Test control - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - //Test Body + //Test Body - v_request := valueof(p_createAe); - v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, -1); + v_request := valueof(p_createAe); + v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, -1); f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response{ - tc_ac.stop; + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response{ + tc_ac.stop; - f_checkAttributesToBeSaved(int2, v_request, v_response.primitive.responsePrimitive); + f_checkAttributesToBeSaved(int2, v_request, v_response.primitive.responsePrimitive); vc_aeIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int2); - setverdict(pass, __SCOPE__ & ": AE creation successfull."); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int2001))) -> value v_response{ - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while creating AE with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating AE"); - } + setverdict(pass, __SCOPE__ & ": AE creation successfull."); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int2001))) -> value v_response{ + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while creating AE with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating AE"); } + } - //Postamble - f_cse_postamble_deleteResources(); + //Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); - } + // Tear down + f_cf01Down(); + } function f_CSE_REG_CRE_013(template RequestPrimitive p_requestPrimitive, in AttributeAux p_optionalAttribute) runs on CseSimu system CseSystem { - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var ResourceType v_resourceType := int16; //remoteCSE + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var ResourceType v_resourceType := int16; //remoteCSE - // Test control + // Test control - // Test component configuration - f_cf04Up(); + // Test component configuration + f_cf04Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble + // Preamble - // Test Body - v_request := f_getCreateRequestPrimitive(v_resourceType, p_requestPrimitive, -1); + // Test Body + v_request := f_getCreateRequestPrimitive(v_resourceType, p_requestPrimitive, -1); f_send(e_mccPort, m_request(v_request)); - tc_ac.start; - alt { - [] mccPort.receive(mw_response(mw_responsePrimitive(int2001, f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Accepted creation for resource type remoteCSE containing attribute " & p_optionalAttribute.name); - f_setResource(v_response.primitive.responsePrimitive.primitiveContent,int16); - } - [] mccPort.receive(mw_response(mw_responsePrimitiveOK(f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); - f_setResource(v_response.primitive.responsePrimitive.primitiveContent,int16); - } - [] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Accepted creation for resource type remoteCSE without containing attribute " & p_optionalAttribute.name); - f_setResource(v_response.primitive.responsePrimitive.primitiveContent,int16); - } - [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Rejected creation of resource type remoteCSE containing attribute " & p_optionalAttribute.name); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating resource type remoteCSE"); - } - } - - // Postamble - f_cse_postamble_deleteResourcesCSE(); - - // Tear down - f_cf04Down(); + tc_ac.start; + alt { + [] mccPort.receive(mw_response(mw_responsePrimitive(int2001, f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Accepted creation for resource type remoteCSE containing attribute " & p_optionalAttribute.name); + f_setResource(v_response.primitive.responsePrimitive.primitiveContent,int16); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveOK(f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); + f_setResource(v_response.primitive.responsePrimitive.primitiveContent,int16); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Accepted creation for resource type remoteCSE without containing attribute " & p_optionalAttribute.name); + f_setResource(v_response.primitive.responsePrimitive.primitiveContent,int16); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Rejected creation of resource type remoteCSE containing attribute " & p_optionalAttribute.name); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating resource type remoteCSE"); + } + } + + // Postamble + f_cse_postamble_deleteResourcesCSE(); + + // Tear down + f_cf04Down(); - }//end f_CSE_REG_CRE_BV_013 + }//end f_CSE_REG_CRE_BV_013 function f_CSE_REG_CRE_017(template RequestPrimitive p_createRequestPrimitive) runs on AeSimu system CseSystem { - //Local variables - var ResourceType v_resourceType := int2; - var RequestPrimitive v_request; + //Local variables + var ResourceType v_resourceType := int2; + var RequestPrimitive v_request; - // Test control + // Test control - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble + // Preamble - // Test Body - v_request := f_getCreateRequestPrimitive(int2, p_createRequestPrimitive, -1); + // Test Body + v_request := f_getCreateRequestPrimitive(int2, p_createRequestPrimitive, -1); f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) { //BAD REQUEST - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Request successfully rejected"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)){ - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error, AE has been registered"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); - } - } + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) { //BAD REQUEST + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Request successfully rejected"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)){ + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error, AE has been registered"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - } + } function f_CSE_REG_CRE_026(template UtTriggerPrimitive p_utRequest, template RequestPrimitive p_request, in universal charstring p_action) runs on CseSimu system CseSystem { - var MsgIn v_request; - var ResponsePrimitive v_responsePrimitive; + var MsgIn v_request; + var ResponsePrimitive v_responsePrimitive; - //Test control - if(not(PICS_MN_CSE or PICS_ASN_CSE)) { - setverdict(inconc, __SCOPE__ & ": IUT shall be MN-CSE or ASN-CSE to run this test case"); - stop; - } + //Test control + if(not(PICS_MN_CSE or PICS_ASN_CSE)) { + setverdict(inconc, __SCOPE__ & ": IUT shall be MN-CSE or ASN-CSE to run this test case"); + stop; + } - //Test component configuration - f_cf04Up(); + //Test component configuration + f_cf04Up(); - //send triggering primitive to SUT + //send triggering primitive to SUT f_cse_sendUtPrimitive_cseSimu(p_utRequest,p_action); - //Test behavior - tc_ac.start; - alt{ + //Test behavior + tc_ac.start; + alt{ - //receive MsgIn requestPrimitive - [] mccPortIn.receive(mw_request(p_request)) -> value v_request { - tc_ac.stop; - setverdict(pass, __SCOPE__&":INFO: Resource type remoteCSE created successfuly"); + //receive MsgIn requestPrimitive + [] mccPortIn.receive(mw_request(p_request)) -> value v_request { + tc_ac.stop; + setverdict(pass, __SCOPE__&":INFO: Resource type remoteCSE created successfuly"); - //set responseStatusCode back to SUT - v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, omit)); + //set responseStatusCode back to SUT + v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, omit)); - //send back responsePrimitive + //send back responsePrimitive f_send(e_mccPortIn, m_response(v_responsePrimitive)); - } - [] mccPortIn.receive { - tc_ac.stop; - setverdict(fail, __SCOPE__&":INFO: Unexpected message received"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__&":INFO: No request received for creating resource type remoteCSE"); - } } + [] mccPortIn.receive { + tc_ac.stop; + setverdict(fail, __SCOPE__&":INFO: Unexpected message received"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__&":INFO: No request received for creating resource type remoteCSE"); + } + } - // Postamble - f_cse_postamble_deleteResourcesCSE(); + // Postamble + f_cse_postamble_deleteResourcesCSE(); - // Tear down - f_cf04Down(); + // Tear down + f_cf04Down(); - } + } function f_CSE_REG_CRE_028(RequestPrimitive p_request, template PrimitiveContent p_contentResponse) runs on CseSimu system CseSystem { - //Local variables - var ResourceType v_resourceType := int16; //remoteCSE - // Test control + //Local variables + var ResourceType v_resourceType := int16; //remoteCSE + // Test control - // Test component configuration - f_cf04Up(); + // Test component configuration + f_cf04Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble + // Preamble - //Test Body - vc_remoteCseIndex := f_cse_registerRemoteCse(p_request, p_contentResponse); + //Test Body + vc_remoteCseIndex := f_cse_registerRemoteCse(p_request, p_contentResponse); - //Check if the resource has been deleted or not - if(f_cse_isResourcePresent_cseSimu(vc_remoteCseIndex)) { - setverdict(pass, __SCOPE__ & ":INFO: Resource created"); - } else { - setverdict(fail, __SCOPE__ & ":INFO: Resource not created"); - } + //Check if the resource has been deleted or not + if(f_cse_isResourcePresent_cseSimu(vc_remoteCseIndex)) { + setverdict(pass, __SCOPE__ & ":INFO: Resource created"); + } else { + setverdict(fail, __SCOPE__ & ":INFO: Resource not created"); + } - // Postamble - f_cse_postamble_deleteResourcesCSE(); + // Postamble + f_cse_postamble_deleteResourcesCSE(); - // Tear down - f_cf04Down(); + // Tear down + f_cf04Down(); - }//end TC_CSE_REG_CRE_028 + }//end TC_CSE_REG_CRE_028 } //end group Create group Retrieve{ - function f_CSE_REG_RET_002(template PrimitiveContent p_contentResponse) runs on AeSimu system CseSystem { - //Local variables - var MsgIn v_response; - var integer v_aeIndex := -1; + function f_CSE_REG_RET_002(template PrimitiveContent p_contentResponse) runs on AeSimu system CseSystem { + //Local variables + var MsgIn v_response; + var integer v_aeIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - f_send(e_mcaPort, m_request(m_retrieve(f_getResourceAddress(), f_getOriginator(v_aeIndex)))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Response OK for retrieving for attribute"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); - } - } + f_send(e_mcaPort, m_request(m_retrieve(f_getResourceAddress(), f_getOriginator(v_aeIndex)))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Response OK for retrieving for attribute"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); - } //end f_CSE_REG_RET_002 + // Tear down + f_cf01Down(); + } //end f_CSE_REG_RET_002 - function f_CSE_REG_RET_004(template RequestPrimitive p_createRequestPrimitive, template PrimitiveContent p_contentResponse) runs on AeSimu system CseSystem { - //Local variables - var MsgIn v_response; - var integer v_aeIndex := -1; + function f_CSE_REG_RET_004(template RequestPrimitive p_createRequestPrimitive, template PrimitiveContent p_contentResponse) runs on AeSimu system CseSystem { + //Local variables + var MsgIn v_response; + var integer v_aeIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_createResource(int2, p_createRequestPrimitive, -1); + // Preamble + v_aeIndex := f_cse_createResource(int2, p_createRequestPrimitive, -1); - f_send(e_mcaPort, m_request(m_retrieve(f_getResourceAddress(v_aeIndex), f_getOriginator(v_aeIndex))));//TODO Maybe PX_SUPER_AE_ID - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Response OK for retrieving for attribute"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); - } - } + f_send(e_mcaPort, m_request(m_retrieve(f_getResourceAddress(v_aeIndex), f_getOriginator(v_aeIndex))));//TODO Maybe PX_SUPER_AE_ID + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Response OK for retrieving for attribute"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); - } //end f_CSE_REG_RET_004 + // Tear down + f_cf01Down(); + } //end f_CSE_REG_RET_004 - function f_CSE_REG_RET_007(template RequestPrimitive p_createRequestPrimitive, template PrimitiveContent p_contentResponse) runs on CseSimu system CseSystem { - var MsgIn v_response; - var RequestPrimitive v_request; - var ResourceType v_resourceType := int16; //remoteCSE - var template PrimitiveContent v_contentResponse; + function f_CSE_REG_RET_007(template RequestPrimitive p_createRequestPrimitive, template PrimitiveContent p_contentResponse) runs on CseSimu system CseSystem { + var MsgIn v_response; + var RequestPrimitive v_request; + var ResourceType v_resourceType := int16; //remoteCSE + var template PrimitiveContent v_contentResponse; - // Test control + // Test control - // Test component configuration - f_cf04Up(); + // Test component configuration + f_cf04Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - vc_remoteCseIndex := f_cse_registerRemoteCse(p_createRequestPrimitive); - f_send(e_mccPort, m_request(m_retrieve(f_getResourceAddress(vc_remoteCseIndex), f_getOriginator(vc_remoteCseIndex)))); - tc_ac.start; - alt { - [] mccPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Response OK for retrieving for attribute"); - } - [] mccPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements"); - } - [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); - } - } + // Preamble + vc_remoteCseIndex := f_cse_registerRemoteCse(p_createRequestPrimitive); + f_send(e_mccPort, m_request(m_retrieve(f_getResourceAddress(vc_remoteCseIndex), f_getOriginator(vc_remoteCseIndex)))); + tc_ac.start; + alt { + [] mccPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Response OK for retrieving for attribute"); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements"); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + } + } - //Postamble - f_cse_postamble_deleteResourcesCSE(); + //Postamble + f_cse_postamble_deleteResourcesCSE(); - // Tear down - f_cf04Down(); - } // f_CSE_REG_RET_007 + // Tear down + f_cf04Down(); + } // f_CSE_REG_RET_007 }//end group Retrieve group Update{ - function f_CSE_REG_UPD_002(template RequestPrimitive p_requestPrimitive) runs on CseSimu system CseSystem { - //Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var ResourceType v_resourceType := int16; //remoteCSE - // Test control + function f_CSE_REG_UPD_002(template RequestPrimitive p_requestPrimitive) runs on CseSimu system CseSystem { + //Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var ResourceType v_resourceType := int16; //remoteCSE + // Test control - // Test component configuration - f_cf04Up(); + // Test component configuration + f_cf04Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - vc_remoteCseIndex := f_cse_registerRemoteCse(m_createRemoteCSEBase); + // Preamble + vc_remoteCseIndex := f_cse_registerRemoteCse(m_createRemoteCSEBase); - // Test Body - v_request := f_getUpdateRequestPrimitive(int16, vc_remoteCseIndex, p_requestPrimitive); + // Test Body + v_request := f_getUpdateRequestPrimitive(int16, vc_remoteCseIndex, p_requestPrimitive); - f_send(e_mccPort, m_request(v_request)); - tc_ac.start; - alt { - [] mccPort.receive(mw_response(mw_responsePrimitive(int2004, f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Accepted update for resource type remoteCSE containing attribute "); - } - [] mccPort.receive(mw_response(mw_responsePrimitiveOK(f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); - } - [] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Accepted update for resource type remoteCSE without containing attribute "); - } - [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Rejected update of resource type remoteCSE containing attribute"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while updating resource type remoteCSE"); - } - } + f_send(e_mccPort, m_request(v_request)); + tc_ac.start; + alt { + [] mccPort.receive(mw_response(mw_responsePrimitive(int2004, f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Accepted update for resource type remoteCSE containing attribute "); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveOK(f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Accepted update for resource type remoteCSE without containing attribute "); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Rejected update of resource type remoteCSE containing attribute"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while updating resource type remoteCSE"); + } + } - // Postamble - f_cse_postamble_deleteResourcesCSE(); + // Postamble + f_cse_postamble_deleteResourcesCSE(); - // Tear down - f_cf04Down(); + // Tear down + f_cf04Down(); - }//end f_CSE_REG_UPD_002 + }//end f_CSE_REG_UPD_002 - function f_CSE_REG_UPD_003(template RequestPrimitive p_requestPrimitive, in AttributeList p_attribute) runs on CseSimu system CseSystem { - // Local variables - //Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var ResourceType v_resourceType := int16; //remoteCSE - var template UtTriggerPrimitive v_utRequest := m_utCreateRemoteCSE; - var universal charstring v_action := __SCOPE__ & ": Please, send a valid UPDATE Request for remoteCSE resource containing a valid attribute " & p_attribute[0]; // Test control - if(not(PICS_MN_CSE)) { - setverdict(inconc, __SCOPE__ & ": IUT shall be MN-CSE to run this test case"); - stop; - } + function f_CSE_REG_UPD_003(template RequestPrimitive p_requestPrimitive, in AttributeList p_attribute) runs on CseSimu system CseSystem { + // Local variables + //Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var ResourceType v_resourceType := int16; //remoteCSE + var template UtTriggerPrimitive v_utRequest := m_utCreateRemoteCSE; + var universal charstring v_action := __SCOPE__ & ": Please, send a valid UPDATE Request for remoteCSE resource containing a valid attribute " & p_attribute[0]; // Test control + if(not(PICS_MN_CSE)) { + setverdict(inconc, __SCOPE__ & ": IUT shall be MN-CSE to run this test case"); + stop; + } - // Test component configuration - f_cf04Up(); + // Test component configuration + f_cf04Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSE); + // Preamble + vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSE); - //Send Trigger Message - v_utRequest.requestPrimitive.to_ := f_getResourceAddress(); - f_cse_sendUtPrimitive_cseSimu(v_utRequest, v_action); + //Send Trigger Message + v_utRequest.requestPrimitive.to_ := f_getResourceAddress(); + f_cse_sendUtPrimitive_cseSimu(v_utRequest, v_action); - // Test Body - v_request := f_getUpdateRequestPrimitive(int16, vc_remoteCseIndex, p_requestPrimitive); + // Test Body + v_request := f_getUpdateRequestPrimitive(int16, vc_remoteCseIndex, p_requestPrimitive); - tc_ac.start; - alt { - [] mccPortIn.receive(mw_request(v_request)) { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Received request for updation for resource type remoteCSE containing attribute " & p_attribute[0]); - f_setResource(v_request.primitiveContent,int16); - } - [] mccPortIn.receive { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error: Did not receive update request for resource type remoteCSE"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while updating resource type remoteCSE"); - } - } + tc_ac.start; + alt { + [] mccPortIn.receive(mw_request(v_request)) { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Received request for updation for resource type remoteCSE containing attribute " & p_attribute[0]); + f_setResource(v_request.primitiveContent,int16); + } + [] mccPortIn.receive { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error: Did not receive update request for resource type remoteCSE"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while updating resource type remoteCSE"); + } + } - // Postamble - f_cse_postamble_deleteResourcesCSE(); + // Postamble + f_cse_postamble_deleteResourcesCSE(); - // Tear down - f_cf04Down(); + // Tear down + f_cf04Down(); - }//end f_CSE_REG_UPD_003 + }//end f_CSE_REG_UPD_003 }// end group Update @@ -2931,7 +2931,7 @@ module OneM2M_PermutationFunctions { // Local variables var integer v_aeIndex, v_remoteCseIndex, v_targetResourceIndex := -1; - var ResponseStatusCode v_responseStatusCode := int2000; + var ResponseStatusCode v_responseStatusCode := int2000; var XSD.ID v_targetResourceAddress; // Test control @@ -2945,7 +2945,7 @@ module OneM2M_PermutationFunctions { v_remoteCseIndex := f_cse_registerRemoteCse(m_createRemoteCSE_poa(vc_cseSimuDesc.cseId, -, -, -, -, {f_getLocalPoA(vc_cseSimuDesc.mccPortIn)})); - vc_ae1.start(f_cse_preamble_registerAe()); + vc_ae1.start(f_cse_preamble_registerAe()); f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1); //Creating resource in Hosting CSE @@ -3003,7 +3003,7 @@ module OneM2M_PermutationFunctions { [] tc_ac.timeout { setverdict(fail, __SCOPE__ & ": No answer while retargeting request"); } - } + } f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1); @@ -3019,7 +3019,7 @@ module OneM2M_PermutationFunctions { // Local variables var integer v_aeIndex, v_cseBaseIndex, v_targetResourceIndex := -1; - var ResponseStatusCode v_responseStatusCode := int2000; + var ResponseStatusCode v_responseStatusCode := int2000; var XSD.ID v_targetResourceAddress; // Test control @@ -3036,7 +3036,7 @@ module OneM2M_PermutationFunctions { vc_cse1.start(f_cse_registerRemoteCse(m_createRemoteCSE_poa(-, -, -, -, -, {f_getLocalPoA()}))); f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); - v_aeIndex := f_cse_preamble_registerAe(); + v_aeIndex := f_cse_preamble_registerAe(); //Creating resource in Hosting CSE vc_cse1.start(f_generateAndSetLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), v_cseBaseIndex, int3)); @@ -3074,7 +3074,7 @@ module OneM2M_PermutationFunctions { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { tc_ac.stop; setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } + } [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { tc_ac.stop; setverdict(fail, __SCOPE__ & ": Error while retargeting request"); @@ -3082,7 +3082,7 @@ module OneM2M_PermutationFunctions { [] tc_ac.timeout { setverdict(fail, __SCOPE__ & ": No answer while retargeting request"); } - } + } f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); @@ -3094,7 +3094,7 @@ module OneM2M_PermutationFunctions { }//end f_CSE_DMR_002 - group Create { + group Create { function f_CSE_DMR_CRE_001(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, in template (omit) RequestPrimitive p_parentRequestPrimitive := omit) runs on AeSimu system CseSystem return ResponsePrimitive { @@ -3144,7 +3144,7 @@ module OneM2M_PermutationFunctions { } - } + } // Test Body if(match(int23, p_requestPrimitive.resourceType)){ @@ -3165,7 +3165,7 @@ module OneM2M_PermutationFunctions { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { tc_ac.stop; setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } + } [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { tc_ac.stop; setverdict(fail, __SCOPE__ & ": Error while creating resource type " & int2str(enum2int(p_resourceType))); @@ -3173,7 +3173,7 @@ module OneM2M_PermutationFunctions { [] tc_ac.timeout { setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(p_resourceType))); } - } + } f_checkAeSimuStatus(); @@ -3194,2304 +3194,2304 @@ module OneM2M_PermutationFunctions { }//end f_CSE_DMR_CRE_001 - function f_CSE_DMR_CRE_001_cseSimu(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, ResourceType p_parentResourceType := int2, in template (omit) RequestPrimitive p_parentRequestPrimitive := omit) runs on CseSimu system CseSystem { + function f_CSE_DMR_CRE_001_cseSimu(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, ResourceType p_parentResourceType := int2, in template (omit) RequestPrimitive p_parentRequestPrimitive := omit) runs on CseSimu system CseSystem { - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_parentIndex := -1; - var integer v_resourceIndex := -1; - var integer v_ae1Index := -1; - var PoaList v_poaList := { f_getLocalPoA(PX_TS_AE1.mcaPortIn) }; + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_parentIndex := -1; + var integer v_resourceIndex := -1; + var integer v_ae1Index := -1; + var PoaList v_poaList := { f_getLocalPoA(PX_TS_AE1.mcaPortIn) }; - // Test control + // Test control - // Test component configuration - f_cf02UpCseSimuMaster(); + // Test component configuration + f_cf02UpCseSimuMaster(); - // Test adapter configuration + // Test adapter configuration - // Preamble - vc_remoteCseIndex := f_cse_registerRemoteCse(m_createRemoteCSEBase); + // Preamble + vc_remoteCseIndex := f_cse_registerRemoteCse(m_createRemoteCSEBase); - if(match(int23, p_resourceType)){ - vc_ae1.start(f_cse_createAccessControlPolicyAux("SubscriptionVerificationAcp", -, int63)); - f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1); - vc_ae1.start(f_cse_createResource_withAcpAux(int2, m_createAe(PX_TS_AE1.appId, -, PX_TS_AE1.aeIdStem, "MyAe", v_poaList), -1)); // AE1 is registered - f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1); - v_ae1Index := f_getResourceFromAeSimu(vc_ae1); - p_requestPrimitive.primitiveContent.subscription.notificationURI := {f_getResourceAddress(v_ae1Index)}; - vc_ae1.start(f_cse_notifyProcedure_subscriptionVerificationHandler()); - } + if(match(int23, p_resourceType)){ + vc_ae1.start(f_cse_createAccessControlPolicyAux("SubscriptionVerificationAcp", -, int63)); + f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1); + vc_ae1.start(f_cse_createResource_withAcpAux(int2, m_createAe(PX_TS_AE1.appId, -, PX_TS_AE1.aeIdStem, "MyAe", v_poaList), -1)); // AE1 is registered + f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1); + v_ae1Index := f_getResourceFromAeSimu(vc_ae1); + p_requestPrimitive.primitiveContent.subscription.notificationURI := {f_getResourceAddress(v_ae1Index)}; + vc_ae1.start(f_cse_notifyProcedure_subscriptionVerificationHandler()); + } - if (not ispresent(p_parentRequestPrimitive)){ //Create the resource directly under RemoteCSE - v_parentIndex := vc_remoteCseIndex; - }else{ //Create the resource under parentResource - v_parentIndex := f_cse_createResource_cseSimu(p_parentResourceType, p_parentRequestPrimitive, vc_remoteCseIndex); - } + if (not ispresent(p_parentRequestPrimitive)){ //Create the resource directly under RemoteCSE + v_parentIndex := vc_remoteCseIndex; + }else{ //Create the resource under parentResource + v_parentIndex := f_cse_createResource_cseSimu(p_parentResourceType, p_parentRequestPrimitive, vc_remoteCseIndex); + } - // Test Body + // Test Body - v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_parentIndex); + v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_parentIndex); - f_send(e_mccPort, m_request(v_request)); - tc_ac.start; - alt { - [] mccPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value vc_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Resource type " & int2str(enum2int(p_resourceType)) & " created successfully"); - f_checkAttributesToBeSaved(p_resourceType, v_request, vc_response.primitive.responsePrimitive); - v_resourceIndex := f_setResource(vc_response.primitive.responsePrimitive.primitiveContent, p_resourceType, v_parentIndex); - } - [] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while creating resource type " & int2str(enum2int(p_resourceType))); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(p_resourceType))); - } - } + f_send(e_mccPort, m_request(v_request)); + tc_ac.start; + alt { + [] mccPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Resource type " & int2str(enum2int(p_resourceType)) & " created successfully"); + f_checkAttributesToBeSaved(p_resourceType, v_request, vc_response.primitive.responsePrimitive); + v_resourceIndex := f_setResource(vc_response.primitive.responsePrimitive.primitiveContent, p_resourceType, v_parentIndex); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while creating resource type " & int2str(enum2int(p_resourceType))); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(p_resourceType))); + } + } - f_checkCseSimuStatus(); + f_checkCseSimuStatus(); - //Check to see if the resource is present or not - if (f_cse_isResourcePresent_cseSimu(v_resourceIndex)){ - setverdict(pass, __SCOPE__ & ":INFO: Resource created"); - } else { - setverdict(fail, __SCOPE__ & ":ERROR: Resource not created"); - } + //Check to see if the resource is present or not + if (f_cse_isResourcePresent_cseSimu(v_resourceIndex)){ + setverdict(pass, __SCOPE__ & ":INFO: Resource created"); + } else { + setverdict(fail, __SCOPE__ & ":ERROR: Resource not created"); + } - // Postamble - f_cse_postamble_deleteResourcesCSE(); + // Postamble + f_cse_postamble_deleteResourcesCSE(); - // Tear down - f_cf02DownCseSimuMaster(); + // Tear down + f_cf02DownCseSimuMaster(); - }//end f_CSE_DMR_CRE_001_cseSimu + }//end f_CSE_DMR_CRE_001_cseSimu - function f_CSE_DMR_CRE_002(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on AeSimu system CseSystem return ResponsePrimitive { + function f_CSE_DMR_CRE_002(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on AeSimu system CseSystem return ResponsePrimitive { - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_ae2Index := -1; - var integer v_resourceIndex := -1; - var integer v_parentIndex := -1; + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_ae2Index := -1; + var integer v_resourceIndex := -1; + var integer v_parentIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); - // Test Body - if(p_resourceType != int18) { - v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent - } - v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_parentIndex); + // Test Body + if(p_resourceType != int18) { + v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + } + v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_parentIndex); - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value vc_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Resource type " & int2str(enum2int(p_resourceType)) & " created successfully"); - f_checkAttributesToBeSaved(p_resourceType, v_request, vc_response.primitive.responsePrimitive); - v_resourceIndex := f_setResource(vc_response.primitive.responsePrimitive.primitiveContent, p_resourceType, v_parentIndex); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while creating resource type " & int2str(enum2int(p_resourceType))); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(p_resourceType))); - } - } + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Resource type " & int2str(enum2int(p_resourceType)) & " created successfully"); + f_checkAttributesToBeSaved(p_resourceType, v_request, vc_response.primitive.responsePrimitive); + v_resourceIndex := f_setResource(vc_response.primitive.responsePrimitive.primitiveContent, p_resourceType, v_parentIndex); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while creating resource type " & int2str(enum2int(p_resourceType))); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(p_resourceType))); + } + } - f_checkAeSimuStatus(); + f_checkAeSimuStatus(); - //Check to see if the resource is present or not - if(f_cse_isResourcePresent(v_resourceIndex)){ - setverdict(pass, __SCOPE__ & ":INFO: Resource created"); - } else { - setverdict(fail, __SCOPE__ & ":ERROR: Resource not created"); - } - // Postamble - f_cse_postamble_deleteResources(); + //Check to see if the resource is present or not + if(f_cse_isResourcePresent(v_resourceIndex)){ + setverdict(pass, __SCOPE__ & ":INFO: Resource created"); + } else { + setverdict(fail, __SCOPE__ & ":ERROR: Resource not created"); + } + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - return vc_response.primitive.responsePrimitive; + return vc_response.primitive.responsePrimitive; - }//end f_CSE_DMR_CRE_002 + }//end f_CSE_DMR_CRE_002 - function f_CSE_DMR_CRE_003(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on AeSimu system CseSystem { + function f_CSE_DMR_CRE_003(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_ae2Index := -1; - var integer v_resourceIndex := -1; - var integer v_parentIndex := -1; + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_ae2Index := -1; + var integer v_resourceIndex := -1; + var integer v_parentIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi) + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi) - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); - if(p_resourceType != int18) { - v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent - } - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); + if(p_resourceType != int18) { + v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + } + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); - if(p_resourceType == int15) { - v_request := f_getCreateRequestPrimitive(int3, m_createContainerBase, v_aeIndex); - v_request.primitiveContent.container.resourceName := vc_resourcesList[v_resourceIndex].resource.pollingChannel.resourceName; - } else { - v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_parentIndex); - } + if(p_resourceType == int15) { + v_request := f_getCreateRequestPrimitive(int3, m_createContainerBase, v_aeIndex); + v_request.primitiveContent.container.resourceName := vc_resourcesList[v_resourceIndex].resource.pollingChannel.resourceName; + } else { + v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_parentIndex); + } - // Test Body - v_request.requestIdentifier := "Existing resource"; + // Test Body + v_request.requestIdentifier := "Existing resource"; - if(p_resourceType == int23){ - if(vc_ae2.running) { - f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); - } - vc_ae2.start(f_cse_notifyProcedure_subscriptionVerificationHandler()); + if(p_resourceType == int23){ + if(vc_ae2.running) { + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); } + vc_ae2.start(f_cse_notifyProcedure_subscriptionVerificationHandler()); + } - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int4105))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Resource already exists"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while creating an already existing resource"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Creating a resource that already exists"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating resource"); - } - } + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4105))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Resource already exists"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while creating an already existing resource"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Creating a resource that already exists"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_DMR_CRE_003 + }//end f_CSE_DMR_CRE_003 - function f_CSE_DMR_CRE_004(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on AeSimu system CseSystem { + function f_CSE_DMR_CRE_004(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_parentIndex := -1; + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_parentIndex := -1; - // Test control - if(not(PICS_ACP_SUPPORT)) { - setverdict(inconc, __SCOPE__ & ": AccessControlPolicy support is required to run this test case"); - stop; - } + // Test control + if(not(PICS_ACP_SUPPORT)) { + setverdict(inconc, __SCOPE__ & ": AccessControlPolicy support is required to run this test case"); + stop; + } - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - if (p_resourceType != int23) { - f_cse_createAccessControlPolicyAux(-, -, int62);//c_RUDNDi) - } else { - f_cse_createAccessControlPolicyAux(-, -, int60);//c_UDNDi); - } + // Preamble + if (p_resourceType != int23) { + f_cse_createAccessControlPolicyAux(-, -, int62);//c_RUDNDi) + } else { + f_cse_createAccessControlPolicyAux(-, -, int60);//c_UDNDi); + } - v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}, -); + v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}, -); - // Test Body - if(p_resourceType != int18) { - v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent - } - v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_parentIndex); + // Test Body + if(p_resourceType != int18) { + v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + } + v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_parentIndex); - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int4103))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Access denied to create a resource"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while creating a resource without privileges"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Resource created without creation privileges"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating resource"); - } - } + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4103))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Access denied to create a resource"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while creating a resource without privileges"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Resource created without creation privileges"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating resource"); + } + } - f_checkAeSimuStatus(); + f_checkAeSimuStatus(); - //Check to see if the resource is NOT present - if(f_cse_isResourceNotPresent(v_aeIndex, f_getResourceName(v_request.primitiveContent))){ - setverdict(pass, __SCOPE__ & ":INFO: Resource not created"); - } else { - setverdict(fail, __SCOPE__ & ":ERROR: Resource created"); - } + //Check to see if the resource is NOT present + if(f_cse_isResourceNotPresent(v_aeIndex, f_getResourceName(v_request.primitiveContent))){ + setverdict(pass, __SCOPE__ & ":INFO: Resource not created"); + } else { + setverdict(fail, __SCOPE__ & ":ERROR: Resource created"); + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_DMR_CRE_004 + }//end f_CSE_DMR_CRE_004 - function f_CSE_DMR_CRE_005(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, in AttributeAux p_invalidAttribute) runs on AeSimu system CseSystem { + function f_CSE_DMR_CRE_005(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, in AttributeAux p_invalidAttribute) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - // Test Body - v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_aeIndex); + // Test Body + v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_aeIndex); - f_send(e_mcaPort, m_request(v_request, {p_invalidAttribute})); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Creation rejected for resource type " & int2str(enum2int(p_resourceType)) & " containing an invalid value for attribute " & p_invalidAttribute.name); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Accepted creation of resource type " & int2str(enum2int(p_resourceType)) & " containing an invalid value for attribute" & p_invalidAttribute.name); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(p_resourceType))); - } - } + f_send(e_mcaPort, m_request(v_request, {p_invalidAttribute})); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Creation rejected for resource type " & int2str(enum2int(p_resourceType)) & " containing an invalid value for attribute " & p_invalidAttribute.name); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Accepted creation of resource type " & int2str(enum2int(p_resourceType)) & " containing an invalid value for attribute" & p_invalidAttribute.name); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(p_resourceType))); + } + } - f_checkAeSimuStatus(); + f_checkAeSimuStatus(); - //Check to see if the resource is NOT present - if(f_cse_isResourceNotPresent(v_aeIndex, f_getResourceName(v_request.primitiveContent))){ - setverdict(pass, __SCOPE__ & ":INFO: Resource not created"); - } else { - setverdict(fail, __SCOPE__ & ":ERROR: Resource created"); - } + //Check to see if the resource is NOT present + if(f_cse_isResourceNotPresent(v_aeIndex, f_getResourceName(v_request.primitiveContent))){ + setverdict(pass, __SCOPE__ & ":INFO: Resource not created"); + } else { + setverdict(fail, __SCOPE__ & ":ERROR: Resource created"); + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_DMR_CRE_005 + }//end f_CSE_DMR_CRE_005 - function f_CSE_DMR_CRE_006(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on AeSimu system CseSystem return ResponsePrimitive { + function f_CSE_DMR_CRE_006(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on AeSimu system CseSystem return ResponsePrimitive { - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - // Test Body - v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_aeIndex); + // Test Body + v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_aeIndex); - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value vc_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Accepted creation rejected for resource type " & int2str(enum2int(p_resourceType))); - f_checkAttributesToBeSaved(p_resourceType, v_request, vc_response.primitive.responsePrimitive); - v_resourceIndex := f_setResource(vc_response.primitive.responsePrimitive.primitiveContent, p_resourceType, v_aeIndex); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Creation rejected of resource type " & int2str(enum2int(p_resourceType))); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(p_resourceType))); - } - } - - f_checkAeSimuStatus(); - - //Check to see if the resource is present or not - if(f_cse_isResourcePresent(v_resourceIndex)){ - setverdict(pass, __SCOPE__ & ":INFO: Resource created"); - } else { - setverdict(fail, __SCOPE__ & ":ERROR: Resource not created"); + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Accepted creation rejected for resource type " & int2str(enum2int(p_resourceType))); + f_checkAttributesToBeSaved(p_resourceType, v_request, vc_response.primitive.responsePrimitive); + v_resourceIndex := f_setResource(vc_response.primitive.responsePrimitive.primitiveContent, p_resourceType, v_aeIndex); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Creation rejected of resource type " & int2str(enum2int(p_resourceType))); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(p_resourceType))); } + } - // Postamble - f_cse_postamble_deleteResources(); + f_checkAeSimuStatus(); - // Tear down - f_cf01Down(); + //Check to see if the resource is present or not + if(f_cse_isResourcePresent(v_resourceIndex)){ + setverdict(pass, __SCOPE__ & ":INFO: Resource created"); + } else { + setverdict(fail, __SCOPE__ & ":ERROR: Resource not created"); + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); - return vc_response.primitive.responsePrimitive; + return vc_response.primitive.responsePrimitive; - }//end f_CSE_DMR_CRE_006 + }//end f_CSE_DMR_CRE_006 - function f_CSE_DMR_CRE_007(ResourceType p_resourceTypeParent, template RequestPrimitive p_requestPrimitiveParent, ResourceType p_resourceTypeChild, template RequestPrimitive p_requestPrimitiveChild1, template RequestPrimitive p_requestPrimitiveChild2, XSD.String p_resourceName) runs on AeSimu system CseSystem { - //Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_parentIndex := -1; - var integer v_childIndex := -1; + function f_CSE_DMR_CRE_007(ResourceType p_resourceTypeParent, template RequestPrimitive p_requestPrimitiveParent, ResourceType p_resourceTypeChild, template RequestPrimitive p_requestPrimitiveChild1, template RequestPrimitive p_requestPrimitiveChild2, XSD.String p_resourceName) runs on AeSimu system CseSystem { + //Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_parentIndex := -1; + var integer v_childIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - v_parentIndex := f_cse_createResource(p_resourceTypeParent, p_requestPrimitiveParent, v_aeIndex); //Parent + v_parentIndex := f_cse_createResource(p_resourceTypeParent, p_requestPrimitiveParent, v_aeIndex); //Parent - v_childIndex := f_cse_createResource(p_resourceTypeChild, p_requestPrimitiveChild1, v_parentIndex); //Child1 + v_childIndex := f_cse_createResource(p_resourceTypeChild, p_requestPrimitiveChild1, v_parentIndex); //Child1 - // Test Body - v_request := f_getCreateRequestPrimitive(p_resourceTypeChild, p_requestPrimitiveChild2, v_parentIndex); ////Child2 + // Test Body + v_request := f_getCreateRequestPrimitive(p_resourceTypeChild, p_requestPrimitiveChild2, v_parentIndex); ////Child2 - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Resource " & int2str(enum2int(p_resourceTypeChild)) & " created"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while creating resource type " & int2str(enum2int(p_resourceTypeChild))); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(p_resourceTypeChild))); - } - } + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Resource " & int2str(enum2int(p_resourceTypeChild)) & " created"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while creating resource type " & int2str(enum2int(p_resourceTypeChild))); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(p_resourceTypeChild))); + } + } - f_checkAeSimuStatus(); + f_checkAeSimuStatus(); - //Check to see if the resource is NOT present - if(f_cse_isResourceNotPresent(v_parentIndex, p_resourceName)){ - setverdict(pass, __SCOPE__ & ":INFO: Oldest resource " & int2str(enum2int(p_resourceTypeChild)) & " has been removed to allow the creation of the new instance"); - } else { - setverdict(fail, __SCOPE__ & ":ERROR: Oldest resource " & int2str(enum2int(p_resourceTypeChild)) & " has not been removed to allow the creation of the new instance"); - } + //Check to see if the resource is NOT present + if(f_cse_isResourceNotPresent(v_parentIndex, p_resourceName)){ + setverdict(pass, __SCOPE__ & ":INFO: Oldest resource " & int2str(enum2int(p_resourceTypeChild)) & " has been removed to allow the creation of the new instance"); + } else { + setverdict(fail, __SCOPE__ & ":ERROR: Oldest resource " & int2str(enum2int(p_resourceTypeChild)) & " has not been removed to allow the creation of the new instance"); + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_DMR_CRE_007 + }//end f_CSE_DMR_CRE_007 - function f_CSE_DMR_CRE_008(ResourceType p_resourceTypeParent, template RequestPrimitive p_requestPrimitiveParent, ResourceType p_resourceTypeChild, template RequestPrimitive p_requestPrimitiveChild1, template RequestPrimitive p_requestPrimitiveChild2, XSD.String p_resourceName) runs on AeSimu system CseSystem { - //Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_parentIndex := -1; - var integer v_childIndex := -1; - // Test control + function f_CSE_DMR_CRE_008(ResourceType p_resourceTypeParent, template RequestPrimitive p_requestPrimitiveParent, ResourceType p_resourceTypeChild, template RequestPrimitive p_requestPrimitiveChild1, template RequestPrimitive p_requestPrimitiveChild2, XSD.String p_resourceName) runs on AeSimu system CseSystem { + //Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_parentIndex := -1; + var integer v_childIndex := -1; + // Test control - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - v_parentIndex := f_cse_createResource(p_resourceTypeParent, p_requestPrimitiveParent, v_aeIndex); //Parent + v_parentIndex := f_cse_createResource(p_resourceTypeParent, p_requestPrimitiveParent, v_aeIndex); //Parent - v_childIndex := f_cse_createResource(p_resourceTypeChild, p_requestPrimitiveChild1, v_parentIndex); //Child1 + v_childIndex := f_cse_createResource(p_resourceTypeChild, p_requestPrimitiveChild1, v_parentIndex); //Child1 - // Test Body + // Test Body - v_request := f_getCreateRequestPrimitive(p_resourceTypeChild, p_requestPrimitiveChild2, v_parentIndex); //Child2 + v_request := f_getCreateRequestPrimitive(p_resourceTypeChild, p_requestPrimitiveChild2, v_parentIndex); //Child2 - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Resource " & int2str(enum2int(p_resourceTypeChild)) & " created"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while creating resource type " & int2str(enum2int(p_resourceTypeChild))); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(p_resourceTypeChild))); - } - } + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Resource " & int2str(enum2int(p_resourceTypeChild)) & " created"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while creating resource type " & int2str(enum2int(p_resourceTypeChild))); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(p_resourceTypeChild))); + } + } - f_checkAeSimuStatus(); + f_checkAeSimuStatus(); - //Check to see if the resource is NOT present - if(f_cse_isResourceNotPresent(v_parentIndex, p_resourceName)){ - setverdict(pass, __SCOPE__ & ":INFO: Oldest resource " & int2str(enum2int(p_resourceTypeChild)) & " has been removed to allow the creation of the new instance"); - } else { - setverdict(fail, __SCOPE__ & ":ERROR: Oldest resource " & int2str(enum2int(p_resourceTypeChild)) & " has not been removed to allow the creation of the new instance"); - } + //Check to see if the resource is NOT present + if(f_cse_isResourceNotPresent(v_parentIndex, p_resourceName)){ + setverdict(pass, __SCOPE__ & ":INFO: Oldest resource " & int2str(enum2int(p_resourceTypeChild)) & " has been removed to allow the creation of the new instance"); + } else { + setverdict(fail, __SCOPE__ & ":ERROR: Oldest resource " & int2str(enum2int(p_resourceTypeChild)) & " has not been removed to allow the creation of the new instance"); + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_DMR_CRE_008 + }//end f_CSE_DMR_CRE_008 - function f_CSE_DMR_CRE_012(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, in AttributeList p_optionalAttribute) runs on AeSimu system CseSystem { + function f_CSE_DMR_CRE_012(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, in AttributeList p_optionalAttribute) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_parentIndex := -1; - var integer v_ae2Index := -1; - const XSD.NCName c_accessControlPolicyIDs := "accessControlPolicyIDs"; - var integer v_resourceIndex := -1; - var XSD.NCName v_myOptionalAttribute := p_optionalAttribute[0]; + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_parentIndex := -1; + var integer v_ae2Index := -1; + const XSD.NCName c_accessControlPolicyIDs := "accessControlPolicyIDs"; + var integer v_resourceIndex := -1; + var XSD.NCName v_myOptionalAttribute := p_optionalAttribute[0]; - // Test control - if(v_myOptionalAttribute == c_accessControlPolicyIDs) { - if(not(PICS_ACP_SUPPORT)) { - setverdict(inconc, __SCOPE__ & ": AccessControlPolicy support is required to run this test case"); - stop; - } + // Test control + if(v_myOptionalAttribute == c_accessControlPolicyIDs) { + if(not(PICS_ACP_SUPPORT)) { + setverdict(inconc, __SCOPE__ & ": AccessControlPolicy support is required to run this test case"); + stop; } + } - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - if (v_myOptionalAttribute == c_accessControlPolicyIDs) { - f_cse_createAccessControlPolicyAux();//c_CRUDNDi) - } + // Preamble + if (v_myOptionalAttribute == c_accessControlPolicyIDs) { + f_cse_createAccessControlPolicyAux();//c_CRUDNDi) + } - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); - if(p_resourceType == int4) { - v_parentIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); - } + if(p_resourceType == int4) { + v_parentIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + } - if(p_resourceType == int30) { - v_parentIndex := f_cse_createResource(int29, m_createTimeSeriesBase, v_aeIndex); - } + if(p_resourceType == int30) { + v_parentIndex := f_cse_createResource(int29, m_createTimeSeriesBase, v_aeIndex); + } - // Test Body - v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_parentIndex); + // Test Body + v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_parentIndex); - if(v_myOptionalAttribute == "creator") { - f_send(e_mcaPort, m_request(v_request, {{v_myOptionalAttribute, omit}})); - } else { - f_send(e_mcaPort, m_request(v_request)); + if(v_myOptionalAttribute == "creator") { + f_send(e_mcaPort, m_request(v_request, {{v_myOptionalAttribute, omit}})); + } else { + f_send(e_mcaPort, m_request(v_request)); + } + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001, f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Accepted creation for resource type " & int2str(enum2int(p_resourceType)) & " containing attribute " & v_myOptionalAttribute); + f_checkAttributesToBeSaved(p_resourceType, v_request, v_response.primitive.responsePrimitive); + v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, p_resourceType, v_parentIndex); } - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001, f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Accepted creation for resource type " & int2str(enum2int(p_resourceType)) & " containing attribute " & v_myOptionalAttribute); - f_checkAttributesToBeSaved(p_resourceType, v_request, v_response.primitive.responsePrimitive); - v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, p_resourceType, v_parentIndex); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Accepted creation for resource type " & int2str(enum2int(p_resourceType)) & " with incorrect attributes"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Rejected creation of resource type " & int2str(enum2int(p_resourceType))); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(p_resourceType))); - } - } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Accepted creation for resource type " & int2str(enum2int(p_resourceType)) & " with incorrect attributes"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Rejected creation of resource type " & int2str(enum2int(p_resourceType))); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(p_resourceType))); + } + } - f_checkAeSimuStatus(); + f_checkAeSimuStatus(); - //Check to see if the resource is present or not - if(f_cse_isResourcePresent(v_resourceIndex)) { - setverdict(pass, __SCOPE__ & ":INFO: Resource created"); - } else { - setverdict(fail, __SCOPE__ & ":ERROR: Resource not created"); - } + //Check to see if the resource is present or not + if(f_cse_isResourcePresent(v_resourceIndex)) { + setverdict(pass, __SCOPE__ & ":INFO: Resource created"); + } else { + setverdict(fail, __SCOPE__ & ":ERROR: Resource not created"); + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_DMR_CRE_012 + }//end f_CSE_DMR_CRE_012 - function f_CSE_DMR_CRE_013(ResourceType p_resourceTypeParent, template RequestPrimitive p_requestPrimitiveParent, ResourceType p_resourceTypeChild, template RequestPrimitive p_requestPrimitiveChild) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_parentIndex := -1; - // Test control + function f_CSE_DMR_CRE_013(ResourceType p_resourceTypeParent, template RequestPrimitive p_requestPrimitiveParent, ResourceType p_resourceTypeChild, template RequestPrimitive p_requestPrimitiveChild) runs on AeSimu system CseSystem { + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_parentIndex := -1; + // Test control - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - v_parentIndex := f_cse_createResource(p_resourceTypeParent, p_requestPrimitiveParent, v_aeIndex); + v_parentIndex := f_cse_createResource(p_resourceTypeParent, p_requestPrimitiveParent, v_aeIndex); - // Test Body - v_request := f_getCreateRequestPrimitive(p_resourceTypeChild, p_requestPrimitiveChild, v_parentIndex); + // Test Body + v_request := f_getCreateRequestPrimitive(p_resourceTypeChild, p_requestPrimitiveChild, v_parentIndex); - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int5207))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Maximum byte size exceeded"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Bad responseStatusCode in response"); - } + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int5207))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Maximum byte size exceeded"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Bad responseStatusCode in response"); + } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Accepted creation of resource type " & int2str(enum2int(p_resourceTypeChild)) & " exceding maximum byte size"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating resource type 4 " & int2str(enum2int(p_resourceTypeChild))); - } - } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Accepted creation of resource type " & int2str(enum2int(p_resourceTypeChild)) & " exceding maximum byte size"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating resource type 4 " & int2str(enum2int(p_resourceTypeChild))); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_DMR_CRE_013 + }//end f_CSE_DMR_CRE_013 - function f_CSE_DMR_CRE_014(ResourceType p_parentResourceType, template RequestPrimitive p_parentResourceRequestPrimitive, ResourceType p_childResourceType, template RequestPrimitive p_childRequestPrimitive) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; + function f_CSE_DMR_CRE_014(ResourceType p_parentResourceType, template RequestPrimitive p_parentResourceRequestPrimitive, ResourceType p_childResourceType, template RequestPrimitive p_childRequestPrimitive) runs on AeSimu system CseSystem { + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - v_resourceIndex := f_cse_createResource(p_parentResourceType, p_parentResourceRequestPrimitive, v_aeIndex); + v_resourceIndex := f_cse_createResource(p_parentResourceType, p_parentResourceRequestPrimitive, v_aeIndex); - // Test Body - v_request := f_getCreateRequestPrimitive(p_childResourceType, p_childRequestPrimitive, v_resourceIndex); + // Test Body + v_request := f_getCreateRequestPrimitive(p_childResourceType, p_childRequestPrimitive, v_resourceIndex); - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Resource created"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error when creating resource"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating resource"); - } - } + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Resource created"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error when creating resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating resource"); + } + } - //Check currentByteSize - f_send(e_mcaPort, m_request(m_retrieve(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex)))); + //Check currentByteSize + f_send(e_mcaPort, m_request(m_retrieve(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex)))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - if(v_response.primitive.responsePrimitive.primitiveContent.container.currentByteSize == 8) { //Default content: "AnyValue" (8 bytes length) - setverdict(pass, __SCOPE__ & ": CurrentByteSize attribute in content resource is incremented successfully"); - } - else{ - setverdict(fail, __SCOPE__ & ": CurrentByteSize attribute in content resource not incremented successfully"); - } - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + if(v_response.primitive.responsePrimitive.primitiveContent.container.currentByteSize == 8) { //Default content: "AnyValue" (8 bytes length) + setverdict(pass, __SCOPE__ & ": CurrentByteSize attribute in content resource is incremented successfully"); } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + else{ + setverdict(fail, __SCOPE__ & ": CurrentByteSize attribute in content resource not incremented successfully"); } - } + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_DMR_CRE_014 + }//end f_CSE_DMR_CRE_014 - function f_CSE_DMR_CRE_015(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on AeSimu system CseSystem { + function f_CSE_DMR_CRE_015(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_ae2Index := -1; - var integer v_parentIndex := -1; + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_ae2Index := -1; + var integer v_parentIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); - // Test Body - if(p_resourceType != int18) { - v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent - } - v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_parentIndex); - v_request.resultContent := int0;//Attributes + // Test Body + if(p_resourceType != int18) { + v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + } + v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_parentIndex); + v_request.resultContent := int0;//Attributes - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001, omit))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": No content provided with RC set to 0"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(omit))) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Content provided with RC set to 0"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while creating resource"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating resource"); - } - } + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001, omit))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": No content provided with RC set to 0"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(omit))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Content provided with RC set to 0"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while creating resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_DMR_CRE_015 + }//end f_CSE_DMR_CRE_015 - function f_CSE_DMR_CRE_016(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on AeSimu system CseSystem { + function f_CSE_DMR_CRE_016(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_ae2Index := -1; - var integer v_parentIndex := -1; + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_ae2Index := -1; + var integer v_parentIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); - // Test Body - if(p_resourceType != int18) { - v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent - } - v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_parentIndex); - v_request.resultContent := int2;//Attributes + // Test Body + if(p_resourceType != int18) { + v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + } + v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_parentIndex); + v_request.resultContent := int2;//Attributes - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001, p_contentResponse))) -> value v_response { - tc_ac.stop; - if(f_isHierarchical(v_response.primitive.responsePrimitive.primitiveContent.uRI)) { - setverdict(pass, __SCOPE__ & ": Response returning correctly only the hierarchical address of the created resource"); - } else { - setverdict(fail, __SCOPE__ & ": Response returning the address of the created resource with wrong format"); - } - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong content provided with RC set to 2"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while creating resource"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating resource"); + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001, p_contentResponse))) -> value v_response { + tc_ac.stop; + if(f_isHierarchical(v_response.primitive.responsePrimitive.primitiveContent.uRI)) { + setverdict(pass, __SCOPE__ & ": Response returning correctly only the hierarchical address of the created resource"); + } else { + setverdict(fail, __SCOPE__ & ": Response returning the address of the created resource with wrong format"); } - } + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong content provided with RC set to 2"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while creating resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_DMR_CRE_016 + }//end f_CSE_DMR_CRE_016 - function f_CSE_DMR_CRE_017(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on AeSimu system CseSystem { + function f_CSE_DMR_CRE_017(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_ae2Index := -1; - var integer v_parentIndex := -1; + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_ae2Index := -1; + var integer v_parentIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); - // Test Body - if(p_resourceType != int18) { - v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent - } - v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_parentIndex); - v_request.resultContent := int3;//Attributes + Hierarchichal Address + // Test Body + if(p_resourceType != int18) { + v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + } + v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_parentIndex); + v_request.resultContent := int3;//Attributes + Hierarchichal Address - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001, p_contentResponse))) -> value v_response { - tc_ac.stop; - if(f_isHierarchical(v_response.primitive.responsePrimitive.primitiveContent.resource.uRI)) { - setverdict(pass, __SCOPE__ & ": Response returning correctly the hierarchical address of the created resource and resource representation"); - } else { - setverdict(fail, __SCOPE__ & ": Response returning the address of the created resource with wrong format"); - } - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong content provided with RC set to 3"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while creating resource"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating resource"); + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001, p_contentResponse))) -> value v_response { + tc_ac.stop; + if(f_isHierarchical(v_response.primitive.responsePrimitive.primitiveContent.resource.uRI)) { + setverdict(pass, __SCOPE__ & ": Response returning correctly the hierarchical address of the created resource and resource representation"); + } else { + setverdict(fail, __SCOPE__ & ": Response returning the address of the created resource with wrong format"); } - } + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong content provided with RC set to 3"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while creating resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_DMR_CRE_017 + }//end f_CSE_DMR_CRE_017 - function f_CSE_DMR_CRE_018(ResultContent p_resultContent) runs on AeSimu system CseSystem { + function f_CSE_DMR_CRE_018(ResultContent p_resultContent) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - // Test Body - v_request := f_getCreateRequestPrimitive(int3, m_createContainerBase, v_aeIndex); - v_request.resultContent := p_resultContent; - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) { //BAD REQUEST - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Request successfully rejected"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error, Result content set to " & int2str(enum2int(p_resultContent)) & " is impossible for a retrieve request "); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); - } - } + // Test Body + v_request := f_getCreateRequestPrimitive(int3, m_createContainerBase, v_aeIndex); + v_request.resultContent := p_resultContent; + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) { //BAD REQUEST + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Request successfully rejected"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error, Result content set to " & int2str(enum2int(p_resultContent)) & " is impossible for a retrieve request "); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_DMR_CRE_018 + }//end f_CSE_DMR_CRE_018 - function f_CSE_DMR_CRE_019(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on AeSimu system CseSystem { + function f_CSE_DMR_CRE_019(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_ae2Index := -1; - var integer v_parentIndex := -1; + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_ae2Index := -1; + var integer v_parentIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); - // Test Body - if(p_resourceType != int18) { - v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent - } - v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_parentIndex); - v_request.resultContent := int1;//Attributes + // Test Body + if(p_resourceType != int18) { + v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + } + v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_parentIndex); + v_request.resultContent := int1;//Attributes - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001, p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Only attributes provided with RC set to 1"); + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001, p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Only attributes provided with RC set to 1"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong content provided with RC set to 1"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while creating resource"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating resource"); - } - } + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong content provided with RC set to 1"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while creating resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_DMR_CRE_019 + }//end f_CSE_DMR_CRE_019 - function f_CSE_DMR_CRE_020(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on AeSimu system CseSystem { + function f_CSE_DMR_CRE_020(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_ae2Index := -1; - var integer v_parentIndex := -1; - - // Test control - - // Test component configuration - f_cf01Up(true); + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_ae2Index := -1; + var integer v_parentIndex := -1; + + // Test control - // Test adapter configuration + // Test component configuration + f_cf01Up(true); - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); - // Test Body - if(p_resourceType != int18) { - v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent - } - v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_parentIndex); - v_request.resultContent := int9;//Modified Attributes + // Test Body + if(p_resourceType != int18) { + v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + } + v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_parentIndex); + v_request.resultContent := int9;//Modified Attributes - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001, p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Only modified attributes provided with RC set to 9"); + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001, p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Only modified attributes provided with RC set to 9"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong content provided with RC set to 9"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while creating resource"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating resource"); - } - } + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong content provided with RC set to 9"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while creating resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_DMR_CRE_020 + }//end f_CSE_DMR_CRE_020 - function f_CSE_DMR_CRE_021(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on CseSimu system CseSystem { + function f_CSE_DMR_CRE_021(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on CseSimu system CseSystem { - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_parentIndex := -1; - var integer v_resourceIndex := -1; - var integer v_aEAnncIndex := -1; + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_parentIndex := -1; + var integer v_resourceIndex := -1; + var integer v_aEAnncIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf04Up(); + // Test component configuration + f_cf04Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - vc_remoteCseIndex := f_cse_registerRemoteCse(m_createRemoteCSEBase); + // Preamble + vc_remoteCseIndex := f_cse_registerRemoteCse(m_createRemoteCSEBase); - v_aEAnncIndex := f_cse_createResource_cseSimu(int10002, m_createAEAnnc(-, vc_cseSimuDesc.cseId, omit, -), vc_remoteCseIndex); //AEAnnnc under RemoteCSE + v_aEAnncIndex := f_cse_createResource_cseSimu(int10002, m_createAEAnnc(-, vc_cseSimuDesc.cseId, omit, -), vc_remoteCseIndex); //AEAnnnc under RemoteCSE - // Test Body + // Test Body - v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_aEAnncIndex); + v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_aEAnncIndex); - f_send(e_mccPort, m_request(v_request)); - tc_ac.start; - alt { - [] mccPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value vc_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Resource type " & int2str(enum2int(p_resourceType)) & " created successfully"); - f_checkAttributesToBeSaved(p_resourceType, v_request, vc_response.primitive.responsePrimitive); - v_resourceIndex := f_setResource(vc_response.primitive.responsePrimitive.primitiveContent, p_resourceType, v_aEAnncIndex); - } - [] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while creating resource type " & int2str(enum2int(p_resourceType))); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(p_resourceType))); - } - } + f_send(e_mccPort, m_request(v_request)); + tc_ac.start; + alt { + [] mccPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Resource type " & int2str(enum2int(p_resourceType)) & " created successfully"); + f_checkAttributesToBeSaved(p_resourceType, v_request, vc_response.primitive.responsePrimitive); + v_resourceIndex := f_setResource(vc_response.primitive.responsePrimitive.primitiveContent, p_resourceType, v_aEAnncIndex); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while creating resource type " & int2str(enum2int(p_resourceType))); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(p_resourceType))); + } + } - f_checkCseSimuStatus(); + f_checkCseSimuStatus(); - //Check to see if the resource is present or not - if (f_cse_isResourcePresent_cseSimu(v_resourceIndex)){ - setverdict(pass, __SCOPE__ & ":INFO: Resource created"); - } else { - setverdict(fail, __SCOPE__ & ":ERROR: Resource not created"); - } + //Check to see if the resource is present or not + if (f_cse_isResourcePresent_cseSimu(v_resourceIndex)){ + setverdict(pass, __SCOPE__ & ":INFO: Resource created"); + } else { + setverdict(fail, __SCOPE__ & ":ERROR: Resource not created"); + } - // Postamble - f_cse_postamble_deleteResourcesCSE(); + // Postamble + f_cse_postamble_deleteResourcesCSE(); - // Tear down - f_cf04Down(); + // Tear down + f_cf04Down(); - }//end f_CSE_DMR_CRE_021 + }//end f_CSE_DMR_CRE_021 - function f_CSE_DMR_CRE_022(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template RequestPrimitive p_requestAnnc) runs on AeSimu system CseSystem { + function f_CSE_DMR_CRE_022(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template RequestPrimitive p_requestAnnc) runs on AeSimu system CseSystem { - // Local variables - var integer v_aeIndex := -1; - var integer v_parentIndex := -1; - var template RequestPrimitive v_create := m_createAe(PX_TS_AE1.appId, omit, omit); - v_create.primitiveContent.aE.announceTo := {PX_TS_CSE1.cseId}; + // Local variables + var integer v_aeIndex := -1; + var integer v_parentIndex := -1; + var template RequestPrimitive v_create := m_createAe(PX_TS_AE1.appId, omit, omit); + v_create.primitiveContent.aE.announceTo := {PX_TS_CSE1.cseId}; - // Test control + // Test control - // Test component configuration - f_cf02Up(); + // Test component configuration + f_cf02Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - vc_cse1.start(f_cse_registerRemoteCse(m_createRemoteCSE_poa(-, -, -, -, -, {f_getLocalPoA()}))); - f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + // Preamble + vc_cse1.start(f_cse_registerRemoteCse(m_createRemoteCSE_poa(-, -, -, -, -, {f_getLocalPoA()}))); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); - vc_cse1.start(f_cse_announcementProcedure_createHandler(mw_createAEAnnc(-, -, -))); - v_aeIndex := f_cse_createResource(int2,v_create); - f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + vc_cse1.start(f_cse_announcementProcedure_createHandler(mw_createAEAnnc(-, -, -))); + v_aeIndex := f_cse_createResource(int2,v_create); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); - if(p_resourceType == int4) { - v_create := m_createContainerBase; - v_create.primitiveContent.container.announceTo := {PX_TS_CSE1.cseId}; - vc_cse1.start(f_cse_announcementProcedure_createHandler()); - v_parentIndex := f_cse_createResource(int3, v_create, v_aeIndex); - f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); - } else if (p_resourceType != int18) { - v_parentIndex := v_aeIndex; - } - - // Test Body - vc_cse1.start(f_cse_announcementProcedure_createHandler(p_requestAnnc)); - f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); + if(p_resourceType == int4) { + v_create := m_createContainerBase; + v_create.primitiveContent.container.announceTo := {PX_TS_CSE1.cseId}; + vc_cse1.start(f_cse_announcementProcedure_createHandler()); + v_parentIndex := f_cse_createResource(int3, v_create, v_aeIndex); f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + } else if (p_resourceType != int18) { + v_parentIndex := v_aeIndex; + } + + // Test Body + vc_cse1.start(f_cse_announcementProcedure_createHandler(p_requestAnnc)); + f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf02Down(); + // Tear down + f_cf02Down(); - }//end f_CSE_DMR_CRE_022 + }//end f_CSE_DMR_CRE_022 - function f_CSE_DMR_CRE_023(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template (present) RequestPrimitive p_requestAnnc) runs on AeSimu system CseSystem{ + function f_CSE_DMR_CRE_023(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template (present) RequestPrimitive p_requestAnnc) runs on AeSimu system CseSystem{ - // Local variables - var integer v_aeIndex := -1; - var integer v_parentIndex := -1; - var template RequestPrimitive v_create := m_createAe(PX_TS_AE1.appId, omit, omit); - v_create.primitiveContent.aE.announceTo := {PX_TS_CSE1.cseId}; + // Local variables + var integer v_aeIndex := -1; + var integer v_parentIndex := -1; + var template RequestPrimitive v_create := m_createAe(PX_TS_AE1.appId, omit, omit); + v_create.primitiveContent.aE.announceTo := {PX_TS_CSE1.cseId}; - // Test control + // Test control - // Test component configuration - f_cf02Up(); + // Test component configuration + f_cf02Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble + // Preamble - vc_cse1.start(f_cse_registerRemoteCse(m_createRemoteCSE_poa(-, -, -, -, -, {f_getLocalPoA()}))); - f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + vc_cse1.start(f_cse_registerRemoteCse(m_createRemoteCSE_poa(-, -, -, -, -, {f_getLocalPoA()}))); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); - vc_cse1.start(f_cse_announcementProcedure_createHandler(mw_createAEAnnc(-, -, -))); - v_aeIndex := f_cse_createResource(int2,v_create); - f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + vc_cse1.start(f_cse_announcementProcedure_createHandler(mw_createAEAnnc(-, -, -))); + v_aeIndex := f_cse_createResource(int2,v_create); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); - if(p_resourceType == int4) { - v_create := m_createContainerBase; - v_create.primitiveContent.container.announceTo := {PX_TS_CSE1.cseId}; - vc_cse1.start(f_cse_announcementProcedure_createHandler()); - v_parentIndex := f_cse_createResource(int3, v_create, v_aeIndex); - f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); - } else if (p_resourceType != int18) { - v_parentIndex := v_aeIndex; - } - - // Test Body - vc_cse1.start(f_cse_announcementProcedure_createHandler(p_requestAnnc)); - f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); + if(p_resourceType == int4) { + v_create := m_createContainerBase; + v_create.primitiveContent.container.announceTo := {PX_TS_CSE1.cseId}; + vc_cse1.start(f_cse_announcementProcedure_createHandler()); + v_parentIndex := f_cse_createResource(int3, v_create, v_aeIndex); f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + } else if (p_resourceType != int18) { + v_parentIndex := v_aeIndex; + } + + // Test Body + vc_cse1.start(f_cse_announcementProcedure_createHandler(p_requestAnnc)); + f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf02Down(); + // Tear down + f_cf02Down(); - //return v_anncRequest.primitive.requestPrimitive; + //return v_anncRequest.primitive.requestPrimitive; - }//end f_CSE_DMR_CRE_023 + }//end f_CSE_DMR_CRE_023 }//end group Create group Retrieve { - function f_CSE_DMR_RET_001(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on AeSimu system CseSystem return ResponsePrimitive { + function f_CSE_DMR_RET_001(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on AeSimu system CseSystem return ResponsePrimitive { - // Local variables - var MsgIn v_response; - var integer v_aeIndex := -1; - var integer v_containerIndex := -1; - var integer v_parentIndex := -1; - var integer v_resourceIndex := -1; - var integer v_ae2Index := -1; + // Local variables + var MsgIn v_response; + var integer v_aeIndex := -1; + var integer v_containerIndex := -1; + var integer v_parentIndex := -1; + var integer v_resourceIndex := -1; + var integer v_ae2Index := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); - if(p_resourceType == int4) { //ContentInstance - v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); - v_parentIndex := v_containerIndex; - } else if (p_resourceType != int18) { - v_parentIndex := v_aeIndex; - } + if(p_resourceType == int4) { //ContentInstance + v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + v_parentIndex := v_containerIndex; + } else if (p_resourceType != int18) { + v_parentIndex := v_aeIndex; + } - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); - // Test Body - f_send(e_mcaPort, m_request(m_retrieve(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex)))); + // Test Body + f_send(e_mcaPort, m_request(m_retrieve(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex)))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Response OK for retrieving"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); - } - } + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Response OK for retrieving"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - return v_response.primitive.responsePrimitive; + return v_response.primitive.responsePrimitive; - }//end f_CSE_DMR_RET_001 + }//end f_CSE_DMR_RET_001 - function f_CSE_DMR_RET_003(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on AeSimu system CseSystem { + function f_CSE_DMR_RET_003(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var integer v_ae2Index := -1; - var integer v_parentIndex := -1; + // Local variables + var MsgIn v_response; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var integer v_ae2Index := -1; + var integer v_parentIndex := -1; - // Test control - if(not(PICS_ACP_SUPPORT)) { - log(__SCOPE__ & ":INFO: AccessControlPolicy support is required for executing this test case"); - stop; - } + // Test control + if(not(PICS_ACP_SUPPORT)) { + log(__SCOPE__ & ":INFO: AccessControlPolicy support is required for executing this test case"); + stop; + } - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - if(p_resourceType != int1) { - f_cse_createAccessControlPolicyAux(-, -, int61);//c_CRUDNDi) - p_requestPrimitive := f_setAcpId(p_requestPrimitive, {f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}); - } + // Preamble + if(p_resourceType != int1) { + f_cse_createAccessControlPolicyAux(-, -, int61);//c_CRUDNDi) + p_requestPrimitive := f_setAcpId(p_requestPrimitive, {f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}); + } - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi; + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi; - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); - if(p_resourceType != int18) { - v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent - } - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); + if(p_resourceType != int18) { + v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + } + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); - // Test Body - f_send(e_mcaPort, m_request(m_retrieve(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex)))); + // Test Body + f_send(e_mcaPort, m_request(m_retrieve(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex)))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int4103))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Access denied to retrieve attributes from resource type " & int2str(enum2int(p_resourceType))); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while retrieving attributes from resource without having privileges"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Retrieving attributes from resource without having privileges"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); - } - } + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4103))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Access denied to retrieve attributes from resource type " & int2str(enum2int(p_resourceType))); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while retrieving attributes from resource without having privileges"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Retrieving attributes from resource without having privileges"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_DMR_RET_003 + }//end f_CSE_DMR_RET_003 - function f_CSE_DMR_RET_004(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on AeSimu system CseSystem { + function f_CSE_DMR_RET_004(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var XSD.String v_attribute := "#pi";//Attribute parentId to be retrieved - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var integer v_ae2Index := -1; - var integer v_parentIndex := -1; + // Local variables + var MsgIn v_response; + var XSD.String v_attribute := "#pi";//Attribute parentId to be retrieved + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var integer v_ae2Index := -1; + var integer v_parentIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); - if(p_resourceType != int18) { - v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent - } + if(p_resourceType != int18) { + v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + } - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); - // Test Body - f_send(e_mcaPort, m_request(m_retrieveAttributeToOption(f_getResourceAddress(v_resourceIndex) & v_attribute, f_getOriginator(v_resourceIndex)))); + // Test Body + f_send(e_mcaPort, m_request(m_retrieveAttributeToOption(f_getResourceAddress(v_resourceIndex) & v_attribute, f_getOriginator(v_resourceIndex)))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Requested attribute retrieved successfully"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error, not only requested attribute retrieved"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while retrieving resource attribute"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while retrieving resource attribute"); - } - } + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Requested attribute retrieved successfully"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error, not only requested attribute retrieved"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while retrieving resource attribute"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource attribute"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_DMR_RET_004 + }//end f_CSE_DMR_RET_004 - function f_CSE_DMR_RET_005(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on AeSimu system CseSystem { + function f_CSE_DMR_RET_005(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var integer v_ae2Index := -1; - var integer v_parentIndex := -1; + // Local variables + var MsgIn v_response; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var integer v_ae2Index := -1; + var integer v_parentIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); - if(p_resourceType != int18) { - v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent - } - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); + if(p_resourceType != int18) { + v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + } + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); - // Test Body - f_send(e_mcaPort, m_request(m_retrieveAttributeContentOption(f_getResourceAddress(v_resourceIndex) , {"pi"}, f_getOriginator(v_resourceIndex)))); + // Test Body + f_send(e_mcaPort, m_request(m_retrieveAttributeContentOption(f_getResourceAddress(v_resourceIndex) , {"pi"}, f_getOriginator(v_resourceIndex)))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Requested attribute retrieved successfully"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error, not only requested attribute retrieved"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while retrieving resource attribute"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while retrieving resource attribute"); - } - } + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Requested attribute retrieved successfully"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error, not only requested attribute retrieved"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while retrieving resource attribute"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource attribute"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_DMR_RET_005 + }//end f_CSE_DMR_RET_005 - function f_CSE_DMR_RET_006(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on AeSimu system CseSystem { + function f_CSE_DMR_RET_006(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var integer v_ae2Index := -1; - var integer v_parentIndex := -1; + // Local variables + var MsgIn v_response; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var integer v_ae2Index := -1; + var integer v_parentIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); - if(p_resourceType != int18) { - v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent - } + if(p_resourceType != int18) { + v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + } - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); - // Test Body - f_send(e_mcaPort, m_request(m_retrieveAttributeContentOption(f_getResourceAddress(v_resourceIndex) , - {"pi", "ct"}, f_getOriginator(v_resourceIndex)))); + // Test Body + f_send(e_mcaPort, m_request(m_retrieveAttributeContentOption(f_getResourceAddress(v_resourceIndex) , + {"pi", "ct"}, f_getOriginator(v_resourceIndex)))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Requested attributes retrieved successfully"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error, not only requested attributes retrieved"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while retrieving resource attributes"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while retrieving resource attributes"); - } - } + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Requested attributes retrieved successfully"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error, not only requested attributes retrieved"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while retrieving resource attributes"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource attributes"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_DMR_RET_006 + }//end f_CSE_DMR_RET_006 - function f_CSE_DMR_RET_007(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on AeSimu system CseSystem { + function f_CSE_DMR_RET_007(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var integer v_ae2Index := -1; - var integer v_parentIndex := -1; + // Local variables + var MsgIn v_response; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var integer v_ae2Index := -1; + var integer v_parentIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); - if(p_resourceType != int18) { - v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent - } - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); + if(p_resourceType != int18) { + v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + } + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); - // Test Body - f_send(e_mcaPort, m_request(m_retrieveAttributeContentOption(f_getResourceAddress(v_resourceIndex), - {"lbl"}, f_getOriginator(v_resourceIndex)))); + // Test Body + f_send(e_mcaPort, m_request(m_retrieveAttributeContentOption(f_getResourceAddress(v_resourceIndex), + {"lbl"}, f_getOriginator(v_resourceIndex)))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int4004))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Non-existing attribute not found"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error : attribute was retrieved while it doesn't exist"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while retrieving resource attribute"); - } - } + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4004))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Non-existing attribute not found"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error : attribute was retrieved while it doesn't exist"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource attribute"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_DMR_RET_007 + }//end f_CSE_DMR_RET_007 - function f_CSE_DMR_RET_008(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, AttributeList_1 p_attributeList) runs on AeSimu system CseSystem { + function f_CSE_DMR_RET_008(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, AttributeList_1 p_attributeList) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var integer v_ae2Index := -1; - var integer v_parentIndex := -1; + // Local variables + var MsgIn v_response; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var integer v_ae2Index := -1; + var integer v_parentIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); - if(p_resourceType != int18) { - v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent - } + if(p_resourceType != int18) { + v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + } - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); - // Test Body - f_send(e_mcaPort, m_request(m_retrieveAttributeContentOption(f_getResourceAddress(v_resourceIndex), - p_attributeList, f_getOriginator(v_resourceIndex)))); + // Test Body + f_send(e_mcaPort, m_request(m_retrieveAttributeContentOption(f_getResourceAddress(v_resourceIndex), + p_attributeList, f_getOriginator(v_resourceIndex)))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int4004))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Non-existing attribute not found"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error : attribute was retrieved while it doesn't exist"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while retrieving resource attributes"); - } - } + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4004))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Non-existing attribute not found"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error : attribute was retrieved while it doesn't exist"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource attributes"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_DMR_RET_008 + }//end f_CSE_DMR_RET_008 - function f_CSE_DMR_RET_013(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on AeSimu system CseSystem { + function f_CSE_DMR_RET_013(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var integer v_ae2Index := -1; + // Local variables + var MsgIn v_response; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var integer v_ae2Index := -1; - // Test control + // Test control - // Test component configuration - if (p_resourceType!=int16){ //ResourceType != RemoteCSE - f_cf01Up(true); - } else { - f_cf02Up(); - } + // Test component configuration + if (p_resourceType!=int16){ //ResourceType != RemoteCSE + f_cf01Up(true); + } else { + f_cf02Up(); + } - // Test adapter configuration + // Test adapter configuration - // Preamble + // Preamble - if(p_resourceType != int2) { //ResourceType != AE + if(p_resourceType != int2) { //ResourceType != AE - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - } + } - if(p_resourceType != int1) { + if(p_resourceType != int1) { - f_cse_createAccessControlPolicyAux(-, -, -); + f_cse_createAccessControlPolicyAux(-, -, -); - p_requestPrimitive := f_setAcpId(p_requestPrimitive, {vc_resourcesList[vc_acpIndex].resource.accessControlPolicy.resourceID}); - } - if (p_resourceType!=int16){ //ResourceType != RemoteCSE + p_requestPrimitive := f_setAcpId(p_requestPrimitive, {vc_resourcesList[vc_acpIndex].resource.accessControlPolicy.resourceID}); + } + if (p_resourceType!=int16){ //ResourceType != RemoteCSE - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource - if (p_resourceType==int2){ - v_aeIndex := v_resourceIndex; - } + if (p_resourceType==int2){ + v_aeIndex := v_resourceIndex; + } - } else { //ResourceType = RemoteCSE + } else { //ResourceType = RemoteCSE - vc_cse1.start(f_cse_registerRemoteCse(p_requestPrimitive)); - f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + vc_cse1.start(f_cse_registerRemoteCse(p_requestPrimitive)); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); - v_resourceIndex := f_getRemoteCseResource(vc_cse1); + v_resourceIndex := f_getRemoteCseResource(vc_cse1); - } + } - // Test Body - f_send(e_mcaPort, m_request(m_retrieve(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_aeIndex))));//from AE ID + // Test Body + f_send(e_mcaPort, m_request(m_retrieve(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_aeIndex))));//from AE ID - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Response OK for retrieving"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); - } - } + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Response OK for retrieving"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - if (p_resourceType!=int16){ //ResourceType != RemoteCSE - f_cf01Down(); - } else { - f_cf02Down(); - } + // Tear down + if (p_resourceType!=int16){ //ResourceType != RemoteCSE + f_cf01Down(); + } else { + f_cf02Down(); + } - }//end f_CSE_DMR_RET_013 + }//end f_CSE_DMR_RET_013 - function f_CSE_DMR_RET_014(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on AeSimu system CseSystem { + function f_CSE_DMR_RET_014(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var integer v_ae2Index := -1; + // Local variables + var MsgIn v_response; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var integer v_ae2Index := -1; - // Test control - if(not(PICS_ACP_SUPPORT)) { - log(__SCOPE__ & ":INFO: AccessControlPolicy support is required for executing this test case"); - stop; - } + // Test control + if(not(PICS_ACP_SUPPORT)) { + log(__SCOPE__ & ":INFO: AccessControlPolicy support is required for executing this test case"); + stop; + } - // Test component configuration - if (p_resourceType!=int16){ //ResourceType != RemoteCSE - f_cf01Up(true); - } else { - f_cf02Up(); - } + // Test component configuration + if (p_resourceType!=int16){ //ResourceType != RemoteCSE + f_cf01Up(true); + } else { + f_cf02Up(); + } - // Test adapter configuration + // Test adapter configuration - // Preamble + // Preamble - if (p_resourceType!=int2){ - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi; - } + if (p_resourceType!=int2){ + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi; + } - if(p_resourceType != int1) { + if(p_resourceType != int1) { - f_cse_createAccessControlPolicyAux(-, -, int61); + f_cse_createAccessControlPolicyAux(-, -, int61); - p_requestPrimitive := f_setAcpId(p_requestPrimitive, {vc_resourcesList[vc_acpIndex].resource.accessControlPolicy.resourceID}); - } + p_requestPrimitive := f_setAcpId(p_requestPrimitive, {vc_resourcesList[vc_acpIndex].resource.accessControlPolicy.resourceID}); + } - if (p_resourceType!=int16){ //ResourceType != RemoteCSE + if (p_resourceType!=int16){ //ResourceType != RemoteCSE - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource - if (p_resourceType==int2){ - v_aeIndex := v_resourceIndex; - } + if (p_resourceType==int2){ + v_aeIndex := v_resourceIndex; + } - } else { //ResourceType = RemoteCSE + } else { //ResourceType = RemoteCSE - vc_cse1.start(f_cse_registerRemoteCse(p_requestPrimitive)); - f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + vc_cse1.start(f_cse_registerRemoteCse(p_requestPrimitive)); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); - v_resourceIndex := f_getRemoteCseResource(vc_cse1); + v_resourceIndex := f_getRemoteCseResource(vc_cse1); - } + } - // Test Body - f_send(e_mcaPort, m_request(m_retrieve(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_aeIndex))));//from AE ID + // Test Body + f_send(e_mcaPort, m_request(m_retrieve(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_aeIndex))));//from AE ID - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int4103))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Access denied to retrieve attributes from resource type " & int2str(enum2int(p_resourceType))); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while retrieving attributes from resource without having privileges"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Retrieving attributes from resource without having privileges"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); - } - } + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4103))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Access denied to retrieve attributes from resource type " & int2str(enum2int(p_resourceType))); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while retrieving attributes from resource without having privileges"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Retrieving attributes from resource without having privileges"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_DMR_RET_014 + }//end f_CSE_DMR_RET_014 - function f_CSE_DMR_RET_015(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on AeSimu system CseSystem { + function f_CSE_DMR_RET_015(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var XSD.String v_attribute := "#pi";//Attribute parentId to be retrieved - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var integer v_ae2Index := -1; + // Local variables + var MsgIn v_response; + var XSD.String v_attribute := "#pi";//Attribute parentId to be retrieved + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var integer v_ae2Index := -1; - // Test control + // Test control - // Test component configuration - if (p_resourceType!=int16){ //ResourceType != RemoteCSE - f_cf01Up(true); - } else { - f_cf02Up(); - } + // Test component configuration + if (p_resourceType!=int16){ //ResourceType != RemoteCSE + f_cf01Up(true); + } else { + f_cf02Up(); + } - // Test adapter configuration + // Test adapter configuration - // Preamble - if(p_resourceType != int2) { //ResourceType != AE - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - } + // Preamble + if(p_resourceType != int2) { //ResourceType != AE + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + } - if(p_resourceType != int1) { + if(p_resourceType != int1) { - f_cse_createAccessControlPolicyAux(-, -, -); + f_cse_createAccessControlPolicyAux(-, -, -); - p_requestPrimitive := f_setAcpId(p_requestPrimitive, {vc_resourcesList[vc_acpIndex].resource.accessControlPolicy.resourceID}); - } - if (p_resourceType!=int16){ //ResourceType != RemoteCSE + p_requestPrimitive := f_setAcpId(p_requestPrimitive, {vc_resourcesList[vc_acpIndex].resource.accessControlPolicy.resourceID}); + } + if (p_resourceType!=int16){ //ResourceType != RemoteCSE - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource - if (p_resourceType==int2){ - v_aeIndex := v_resourceIndex; - } + if (p_resourceType==int2){ + v_aeIndex := v_resourceIndex; + } - } else { - vc_cse1.start(f_cse_registerRemoteCse(p_requestPrimitive)); - f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + } else { + vc_cse1.start(f_cse_registerRemoteCse(p_requestPrimitive)); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); - v_resourceIndex := f_getRemoteCseResource(vc_cse1); - } + v_resourceIndex := f_getRemoteCseResource(vc_cse1); + } - // Test Body - f_send(e_mcaPort, m_request(m_retrieveAttributeToOption(f_getResourceAddress(v_resourceIndex) & v_attribute, f_getOriginator(v_aeIndex))));//from AE ID + // Test Body + f_send(e_mcaPort, m_request(m_retrieveAttributeToOption(f_getResourceAddress(v_resourceIndex) & v_attribute, f_getOriginator(v_aeIndex))));//from AE ID - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Requested attribute retrieved successfully"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error, not only requested attribute retrieved"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while retrieving resource attribute"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while retrieving resource attribute"); - } - } + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Requested attribute retrieved successfully"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error, not only requested attribute retrieved"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while retrieving resource attribute"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource attribute"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - if (p_resourceType!=int16){ //ResourceType != RemoteCSE - f_cf01Down(); - } else { - f_cf02Down(); - } + // Tear down + if (p_resourceType!=int16){ //ResourceType != RemoteCSE + f_cf01Down(); + } else { + f_cf02Down(); + } - }//end f_CSE_DMR_RET_015 + }//end f_CSE_DMR_RET_015 - function f_CSE_DMR_RET_016(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on AeSimu system CseSystem { + function f_CSE_DMR_RET_016(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var integer v_ae2Index := -1; + // Local variables + var MsgIn v_response; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var integer v_ae2Index := -1; - // Test control + // Test control - // Test component configuration - if (p_resourceType!=int16){ //ResourceType != RemoteCSE - f_cf01Up(true); - } else { - f_cf02Up(); - } + // Test component configuration + if (p_resourceType!=int16){ //ResourceType != RemoteCSE + f_cf01Up(true); + } else { + f_cf02Up(); + } - // Test adapter configuration + // Test adapter configuration - // Preamble - if(p_resourceType != int2) { //ResourceType != AE - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - } + // Preamble + if(p_resourceType != int2) { //ResourceType != AE + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + } - if(p_resourceType != int1) { + if(p_resourceType != int1) { - f_cse_createAccessControlPolicyAux(-, -, -); + f_cse_createAccessControlPolicyAux(-, -, -); - p_requestPrimitive := f_setAcpId(p_requestPrimitive, {vc_resourcesList[vc_acpIndex].resource.accessControlPolicy.resourceID}); - } - if (p_resourceType!=int16){ //ResourceType != RemoteCSE + p_requestPrimitive := f_setAcpId(p_requestPrimitive, {vc_resourcesList[vc_acpIndex].resource.accessControlPolicy.resourceID}); + } + if (p_resourceType!=int16){ //ResourceType != RemoteCSE - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource - if (p_resourceType==int2){ - v_aeIndex := v_resourceIndex; - } + if (p_resourceType==int2){ + v_aeIndex := v_resourceIndex; + } - }else{ - vc_cse1.start(f_cse_registerRemoteCse(p_requestPrimitive)); - f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + }else{ + vc_cse1.start(f_cse_registerRemoteCse(p_requestPrimitive)); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); - v_resourceIndex := f_getRemoteCseResource(vc_cse1); - } + v_resourceIndex := f_getRemoteCseResource(vc_cse1); + } - f_send(e_mcaPort, m_request(m_retrieveAttributeContentOption(f_getResourceAddress(v_resourceIndex) , {"pi"}, f_getOriginator(v_aeIndex))));//from AE ID + f_send(e_mcaPort, m_request(m_retrieveAttributeContentOption(f_getResourceAddress(v_resourceIndex) , {"pi"}, f_getOriginator(v_aeIndex))));//from AE ID - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Requested attribute retrieved successfully"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error, not only requested attribute retrieved"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while retrieving resource attribute"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while retrieving resource attribute"); - } - } + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Requested attribute retrieved successfully"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error, not only requested attribute retrieved"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while retrieving resource attribute"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource attribute"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - if (p_resourceType!=int16){ //ResourceType != RemoteCSE - f_cf01Down(); - } else { - f_cf02Down(); - } + // Tear down + if (p_resourceType!=int16){ //ResourceType != RemoteCSE + f_cf01Down(); + } else { + f_cf02Down(); + } - }//end f_CSE_DMR_RET_016 + }//end f_CSE_DMR_RET_016 - function f_CSE_DMR_RET_017(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on AeSimu system CseSystem { + function f_CSE_DMR_RET_017(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var integer v_ae2Index := -1; + // Local variables + var MsgIn v_response; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var integer v_ae2Index := -1; - // Test control + // Test control - // Test component configuration - if (p_resourceType!=int16){ //ResourceType != RemoteCSE - f_cf01Up(true); - } else { - f_cf02Up(); - } + // Test component configuration + if (p_resourceType!=int16){ //ResourceType != RemoteCSE + f_cf01Up(true); + } else { + f_cf02Up(); + } - // Test adapter configuration + // Test adapter configuration - // Preamble - if(p_resourceType != int2) { //ResourceType != AE - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - } + // Preamble + if(p_resourceType != int2) { //ResourceType != AE + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + } - if(p_resourceType != int1) { + if(p_resourceType != int1) { - f_cse_createAccessControlPolicyAux(-, -, -); + f_cse_createAccessControlPolicyAux(-, -, -); - p_requestPrimitive := f_setAcpId(p_requestPrimitive, {vc_resourcesList[vc_acpIndex].resource.accessControlPolicy.resourceID}); - } - if (p_resourceType!=int16){ //ResourceType != RemoteCSE + p_requestPrimitive := f_setAcpId(p_requestPrimitive, {vc_resourcesList[vc_acpIndex].resource.accessControlPolicy.resourceID}); + } + if (p_resourceType!=int16){ //ResourceType != RemoteCSE - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource - if (p_resourceType==int2){ - v_aeIndex := v_resourceIndex; - } + if (p_resourceType==int2){ + v_aeIndex := v_resourceIndex; + } - }else{ - vc_cse1.start(f_cse_registerRemoteCse(p_requestPrimitive)); - f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + }else{ + vc_cse1.start(f_cse_registerRemoteCse(p_requestPrimitive)); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); - v_resourceIndex := f_getRemoteCseResource(vc_cse1); - } + v_resourceIndex := f_getRemoteCseResource(vc_cse1); + } - f_send(e_mcaPort,m_request(m_retrieveAttributeContentOption(f_getResourceAddress(v_resourceIndex) , - {"pi", "ct"}, f_getOriginator(v_aeIndex))));//from AE ID + f_send(e_mcaPort,m_request(m_retrieveAttributeContentOption(f_getResourceAddress(v_resourceIndex) , + {"pi", "ct"}, f_getOriginator(v_aeIndex))));//from AE ID - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Requested attributes retrieved successfully"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error, not only requested attributes retrieved"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while retrieving resource attributes"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while retrieving resource attributes"); - } - } + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Requested attributes retrieved successfully"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error, not only requested attributes retrieved"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while retrieving resource attributes"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource attributes"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - if (p_resourceType!=int16){ //ResourceType != RemoteCSE - f_cf01Down(); - } else { - f_cf02Down(); - } + // Tear down + if (p_resourceType!=int16){ //ResourceType != RemoteCSE + f_cf01Down(); + } else { + f_cf02Down(); + } - }//end f_CSE_DMR_RET_017 + }//end f_CSE_DMR_RET_017 - function f_CSE_DMR_RET_018(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on AeSimu system CseSystem { + function f_CSE_DMR_RET_018(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var integer v_ae2Index := -1; + // Local variables + var MsgIn v_response; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var integer v_ae2Index := -1; - // Test control + // Test control - // Test component configuration - if (p_resourceType!=int16){ //ResourceType != RemoteCSE - f_cf01Up(true); - } else { - f_cf02Up(); - }; + // Test component configuration + if (p_resourceType!=int16){ //ResourceType != RemoteCSE + f_cf01Up(true); + } else { + f_cf02Up(); + }; - // Test adapter configuration + // Test adapter configuration - // Preamble - if(p_resourceType != int2) { //ResourceType != AE - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - } + // Preamble + if(p_resourceType != int2) { //ResourceType != AE + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + } - if(p_resourceType != int1) { + if(p_resourceType != int1) { - f_cse_createAccessControlPolicyAux(-, -, -); + f_cse_createAccessControlPolicyAux(-, -, -); - p_requestPrimitive := f_setAcpId(p_requestPrimitive, {vc_resourcesList[vc_acpIndex].resource.accessControlPolicy.resourceID}); - } - if (p_resourceType!=int16){ //ResourceType != RemoteCSE + p_requestPrimitive := f_setAcpId(p_requestPrimitive, {vc_resourcesList[vc_acpIndex].resource.accessControlPolicy.resourceID}); + } + if (p_resourceType!=int16){ //ResourceType != RemoteCSE - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource - if (p_resourceType==int2){ - v_aeIndex := v_resourceIndex; - } + if (p_resourceType==int2){ + v_aeIndex := v_resourceIndex; + } - }else{ - vc_cse1.start(f_cse_registerRemoteCse(p_requestPrimitive)); - f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + }else{ + vc_cse1.start(f_cse_registerRemoteCse(p_requestPrimitive)); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); - v_resourceIndex := f_getRemoteCseResource(vc_cse1); - } + v_resourceIndex := f_getRemoteCseResource(vc_cse1); + } - f_send(e_mcaPort, m_request(m_retrieveAttributeContentOption(f_getResourceAddress(v_resourceIndex), - {"lbl"}, f_getOriginator(v_aeIndex))));//from AE ID + f_send(e_mcaPort, m_request(m_retrieveAttributeContentOption(f_getResourceAddress(v_resourceIndex), + {"lbl"}, f_getOriginator(v_aeIndex))));//from AE ID - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int4004))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Retrieved attribute does not exist"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error : attribute was retrieved while it doesn't exist"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while retrieving resource attribute"); - } - } + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4004))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Retrieved attribute does not exist"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error : attribute was retrieved while it doesn't exist"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource attribute"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - if (p_resourceType!=int16){ //ResourceType != RemoteCSE - f_cf01Down(); - } else { - f_cf02Down(); - } + // Tear down + if (p_resourceType!=int16){ //ResourceType != RemoteCSE + f_cf01Down(); + } else { + f_cf02Down(); + } - }//end f_CSE_DMR_RET_018 + }//end f_CSE_DMR_RET_018 - function f_CSE_DMR_RET_019(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on AeSimu system CseSystem { + function f_CSE_DMR_RET_019(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var integer v_ae2Index := -1; + // Local variables + var MsgIn v_response; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var integer v_ae2Index := -1; - // Test control + // Test control - // Test component configuration - if (p_resourceType!=int16){ //ResourceType != RemoteCSE - f_cf01Up(true); - } else { - f_cf02Up(); - } + // Test component configuration + if (p_resourceType!=int16){ //ResourceType != RemoteCSE + f_cf01Up(true); + } else { + f_cf02Up(); + } - // Test adapter configuration + // Test adapter configuration - // Preamble - if(p_resourceType != int2) { //ResourceType != AE - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - } + // Preamble + if(p_resourceType != int2) { //ResourceType != AE + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + } - if(p_resourceType != int1) { + if(p_resourceType != int1) { - f_cse_createAccessControlPolicyAux(-, -, -); + f_cse_createAccessControlPolicyAux(-, -, -); - p_requestPrimitive := f_setAcpId(p_requestPrimitive, {vc_resourcesList[vc_acpIndex].resource.accessControlPolicy.resourceID}); - } - if (p_resourceType!=int16){ //ResourceType != RemoteCSE + p_requestPrimitive := f_setAcpId(p_requestPrimitive, {vc_resourcesList[vc_acpIndex].resource.accessControlPolicy.resourceID}); + } + if (p_resourceType!=int16){ //ResourceType != RemoteCSE - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType); - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource - if (p_resourceType==int2){ - v_aeIndex := v_resourceIndex; - } + if (p_resourceType==int2){ + v_aeIndex := v_resourceIndex; + } - }else{ - vc_cse1.start(f_cse_registerRemoteCse(p_requestPrimitive)); - f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + }else{ + vc_cse1.start(f_cse_registerRemoteCse(p_requestPrimitive)); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); - v_resourceIndex := f_getRemoteCseResource(vc_cse1); - } + v_resourceIndex := f_getRemoteCseResource(vc_cse1); + } - f_send(e_mcaPort, m_request(m_retrieveAttributeContentOption(f_getResourceAddress(v_resourceIndex), - {"lbl", "at"}, f_getOriginator(v_aeIndex))));//from AE ID + f_send(e_mcaPort, m_request(m_retrieveAttributeContentOption(f_getResourceAddress(v_resourceIndex), + {"lbl", "at"}, f_getOriginator(v_aeIndex))));//from AE ID - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int4004))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Retrieved attribute does not exist"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error : attribute was retrieved while it doesn't exist"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while retrieving resource attributes"); - } - } + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4004))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Retrieved attribute does not exist"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error : attribute was retrieved while it doesn't exist"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource attributes"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - if (p_resourceType!=int16){ //ResourceType != RemoteCSE - f_cf01Down(); - } else { - f_cf02Down(); - } + // Tear down + if (p_resourceType!=int16){ //ResourceType != RemoteCSE + f_cf01Down(); + } else { + f_cf02Down(); + } - }//end f_CSE_DMR_RET_019 + }//end f_CSE_DMR_RET_019 function f_CSE_DMR_RET_020(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, ResultContent p_resultContent) runs on AeSimu system CseSystem { @@ -5511,7 +5511,7 @@ module OneM2M_PermutationFunctions { // Preamble v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); // Test Body v_request := valueof(m_retrieve(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))); @@ -5523,7 +5523,7 @@ module OneM2M_PermutationFunctions { tc_ac.stop; setverdict(pass, __SCOPE__ & ": Request successfully rejected"); } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { tc_ac.stop; setverdict(fail, __SCOPE__ & ": Wrong response status code"); } @@ -5534,7 +5534,7 @@ module OneM2M_PermutationFunctions { [] tc_ac.timeout { setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); } - } + } // Postamble f_cse_postamble_deleteResources(); @@ -5546,1330 +5546,1330 @@ module OneM2M_PermutationFunctions { function f_CSE_DMR_RET_021(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse, template ResourceType p_childResourceType, template RequestPrimitive p_childRequestPrimitive) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_ae2Index := -1; - var integer v_resourceIndex := -1; - var integer v_childResourceIndex := -1; - var integer v_parentIndex := -1; - // Test control + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_ae2Index := -1; + var integer v_resourceIndex := -1; + var integer v_childResourceIndex := -1; + var integer v_parentIndex := -1; + // Test control - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - if(isvalue(p_childResourceType)) { - if(valueof(p_childResourceType) == int23) { - f_cse_preamble_subscriptionVerification(v_ae2Index, p_childRequestPrimitive, valueof(p_childResourceType)); - } else { - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, valueof(p_resourceType)); - } - } - - if(p_resourceType != int18) { - v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + if(isvalue(p_childResourceType)) { + if(valueof(p_childResourceType) == int23) { + f_cse_preamble_subscriptionVerification(v_ae2Index, p_childRequestPrimitive, valueof(p_childResourceType)); + } else { + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, valueof(p_resourceType)); } - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); + } + + if(p_resourceType != int18) { + v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + } + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); - if(p_resourceType != int15) { - v_childResourceIndex := f_cse_createResource(valueof(p_childResourceType), p_childRequestPrimitive, v_resourceIndex); - } + if(p_resourceType != int15) { + v_childResourceIndex := f_cse_createResource(valueof(p_childResourceType), p_childRequestPrimitive, v_resourceIndex); + } - // Test Body - v_request := valueof(m_retrieve(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))); - v_request.resultContent := int1;//Attributes - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": No child resources provided with RC set to " & int2str(enum2int(v_request.resultContent))); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Child resources provided with RC set to " & int2str(enum2int(v_request.resultContent))); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); - } - } + // Test Body + v_request := valueof(m_retrieve(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))); + v_request.resultContent := int1;//Attributes + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": No child resources provided with RC set to " & int2str(enum2int(v_request.resultContent))); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Child resources provided with RC set to " & int2str(enum2int(v_request.resultContent))); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_DMR_RET_021 + }//end f_CSE_DMR_RET_021 - function f_CSE_DMR_RET_022(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse, template ResourceType p_childResourceType, template RequestPrimitive p_childRequestPrimitive) runs on AeSimu system CseSystem { + function f_CSE_DMR_RET_022(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse, template ResourceType p_childResourceType, template RequestPrimitive p_childRequestPrimitive) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_ae2Index := -1; - var integer v_resourceIndex := -1; - var integer v_childResourceIndex := -1; - var integer v_parentIndex := -1; + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_ae2Index := -1; + var integer v_resourceIndex := -1; + var integer v_childResourceIndex := -1; + var integer v_parentIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - if(isvalue(p_childResourceType)) { - if(valueof(p_childResourceType) == int23) { - f_cse_preamble_subscriptionVerification(v_ae2Index, p_childRequestPrimitive, valueof(p_childResourceType)); - } else { - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, valueof(p_resourceType)); - } - } - - if(p_resourceType != int18) { - v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + if(isvalue(p_childResourceType)) { + if(valueof(p_childResourceType) == int23) { + f_cse_preamble_subscriptionVerification(v_ae2Index, p_childRequestPrimitive, valueof(p_childResourceType)); + } else { + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, valueof(p_resourceType)); } - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); + } + + if(p_resourceType != int18) { + v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + } + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); - if(p_resourceType != int15) { - v_childResourceIndex := f_cse_createResource(valueof(p_childResourceType), p_childRequestPrimitive, v_resourceIndex); - } + if(p_resourceType != int15) { + v_childResourceIndex := f_cse_createResource(valueof(p_childResourceType), p_childRequestPrimitive, v_resourceIndex); + } - // Test Body - v_request := valueof(m_retrieve(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))); - v_request.resultContent := int4;//Attributes and child resources - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Attributes and child resources provided with RC set to " & int2str(enum2int(v_request.resultContent))); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Child resources provided with RC set to " & int2str(enum2int(v_request.resultContent))); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); - } - } + // Test Body + v_request := valueof(m_retrieve(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))); + v_request.resultContent := int4;//Attributes and child resources + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Attributes and child resources provided with RC set to " & int2str(enum2int(v_request.resultContent))); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Child resources provided with RC set to " & int2str(enum2int(v_request.resultContent))); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_DMR_RET_022 + }//end f_CSE_DMR_RET_022 - function f_CSE_DMR_RET_023(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse, template ResourceType p_childResourceType, template RequestPrimitive p_childRequestPrimitive) runs on AeSimu system CseSystem { + function f_CSE_DMR_RET_023(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse, template ResourceType p_childResourceType, template RequestPrimitive p_childRequestPrimitive) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_ae2Index := -1; - var integer v_resourceIndex := -1; - var integer v_childResourceIndex := -1; - var integer v_parentIndex := -1; + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_ae2Index := -1; + var integer v_resourceIndex := -1; + var integer v_childResourceIndex := -1; + var integer v_parentIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - if(isvalue(p_childResourceType)) { - if(valueof(p_childResourceType) == int23) { - f_cse_preamble_subscriptionVerification(v_ae2Index, p_childRequestPrimitive, valueof(p_childResourceType)); - } else { - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, valueof(p_resourceType)); - } - } - - if(p_resourceType != int18) { - v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + if(isvalue(p_childResourceType)) { + if(valueof(p_childResourceType) == int23) { + f_cse_preamble_subscriptionVerification(v_ae2Index, p_childRequestPrimitive, valueof(p_childResourceType)); + } else { + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, valueof(p_resourceType)); } - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); + } + + if(p_resourceType != int18) { + v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + } + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); - if(p_resourceType != int15) { - v_childResourceIndex := f_cse_createResource(valueof(p_childResourceType), p_childRequestPrimitive, v_resourceIndex); - } + if(p_resourceType != int15) { + v_childResourceIndex := f_cse_createResource(valueof(p_childResourceType), p_childRequestPrimitive, v_resourceIndex); + } - // Test Body - v_request := valueof(m_retrieve(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))); - v_request.resultContent := int5;//attributes and child resource references - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Attributes and child resources reference provided with RC set to " & int2str(enum2int(v_request.resultContent))); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Child resources provided with RC set to " & int2str(enum2int(v_request.resultContent))); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); - } - } + // Test Body + v_request := valueof(m_retrieve(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))); + v_request.resultContent := int5;//attributes and child resource references + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Attributes and child resources reference provided with RC set to " & int2str(enum2int(v_request.resultContent))); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Child resources provided with RC set to " & int2str(enum2int(v_request.resultContent))); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_DMR_RET_023 + }//end f_CSE_DMR_RET_023 - function f_CSE_DMR_RET_024(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse, template ResourceType p_childResourceType, template RequestPrimitive p_childRequestPrimitive) runs on AeSimu system CseSystem { + function f_CSE_DMR_RET_024(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse, template ResourceType p_childResourceType, template RequestPrimitive p_childRequestPrimitive) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_ae2Index := -1; - var integer v_resourceIndex := -1; - var integer v_childResourceIndex := -1; - var integer v_parentIndex := -1; + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_ae2Index := -1; + var integer v_resourceIndex := -1; + var integer v_childResourceIndex := -1; + var integer v_parentIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - if(isvalue(p_childResourceType)) { - if(valueof(p_childResourceType) == int23) { - f_cse_preamble_subscriptionVerification(v_ae2Index, p_childRequestPrimitive, valueof(p_childResourceType)); - } else { - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, valueof(p_resourceType)); - } - } - - if(p_resourceType != int18) { - v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + if(isvalue(p_childResourceType)) { + if(valueof(p_childResourceType) == int23) { + f_cse_preamble_subscriptionVerification(v_ae2Index, p_childRequestPrimitive, valueof(p_childResourceType)); + } else { + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, valueof(p_resourceType)); } - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); + } + + if(p_resourceType != int18) { + v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + } + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); - if(p_resourceType != int15) { - v_childResourceIndex := f_cse_createResource(valueof(p_childResourceType), p_childRequestPrimitive, v_resourceIndex); - } + if(p_resourceType != int15) { + v_childResourceIndex := f_cse_createResource(valueof(p_childResourceType), p_childRequestPrimitive, v_resourceIndex); + } - // Test Body - v_request := valueof(m_retrieve(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))); - v_request.resultContent := int6;//Child resource references - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Only child resources references provided with RC set to " & int2str(enum2int(v_request.resultContent))); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Child resources provided with RC set to " & int2str(enum2int(v_request.resultContent))); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); - } - } + // Test Body + v_request := valueof(m_retrieve(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))); + v_request.resultContent := int6;//Child resource references + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Only child resources references provided with RC set to " & int2str(enum2int(v_request.resultContent))); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Child resources provided with RC set to " & int2str(enum2int(v_request.resultContent))); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_DMR_RET_024 + }//end f_CSE_DMR_RET_024 - function f_CSE_DMR_RET_025(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse, template ResourceType p_childResourceType, template RequestPrimitive p_childRequestPrimitive) runs on AeSimu system CseSystem { + function f_CSE_DMR_RET_025(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse, template ResourceType p_childResourceType, template RequestPrimitive p_childRequestPrimitive) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_ae2Index := -1; - var integer v_resourceIndex := -1; - var integer v_childResourceIndex := -1; - var integer v_parentIndex := -1; + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_ae2Index := -1; + var integer v_resourceIndex := -1; + var integer v_childResourceIndex := -1; + var integer v_parentIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - if(isvalue(p_childResourceType)) { - if(valueof(p_childResourceType) == int23) { - f_cse_preamble_subscriptionVerification(v_ae2Index, p_childRequestPrimitive, valueof(p_childResourceType)); - } else { - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, valueof(p_resourceType)); - } + if(isvalue(p_childResourceType)) { + if(valueof(p_childResourceType) == int23) { + f_cse_preamble_subscriptionVerification(v_ae2Index, p_childRequestPrimitive, valueof(p_childResourceType)); + } else { + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, valueof(p_resourceType)); } + } - if(p_resourceType != int18) { - v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent - } - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); + if(p_resourceType != int18) { + v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + } + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); - if(p_resourceType != int15) { - v_childResourceIndex := f_cse_createResource(valueof(p_childResourceType), p_childRequestPrimitive, v_resourceIndex); - } + if(p_resourceType != int15) { + v_childResourceIndex := f_cse_createResource(valueof(p_childResourceType), p_childRequestPrimitive, v_resourceIndex); + } - // Test Body - v_request := valueof(m_retrieve(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))); - v_request.resultContent := int8;//Child resources - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Only child resources provided with RC set to " & int2str(enum2int(v_request.resultContent))); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Child resources provided with RC set to " & int2str(enum2int(v_request.resultContent))); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); - } - } + // Test Body + v_request := valueof(m_retrieve(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))); + v_request.resultContent := int8;//Child resources + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Only child resources provided with RC set to " & int2str(enum2int(v_request.resultContent))); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Child resources provided with RC set to " & int2str(enum2int(v_request.resultContent))); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_DMR_RET_025 + }//end f_CSE_DMR_RET_025 - function f_CSE_DMR_RET_026(ResourceType p_resourceType, template PrimitiveContent p_originalResource, template RequestPrimitive p_createRequestAnnc) runs on AeSimu system CseSystem { + function f_CSE_DMR_RET_026(ResourceType p_resourceType, template PrimitiveContent p_originalResource, template RequestPrimitive p_createRequestAnnc) runs on AeSimu system CseSystem { - //Local variables - var template RequestPrimitive v_request; - var integer v_cseBaseIndex := -1; - var integer v_aeIndex := -1; - var integer v_remoteCSEIndex := -1; - var integer v_originalResourceIndex, v_originalLocalResourceIndex := -1; - var XSD.ID v_originalResourceAddress; - var XSD.ID v_resourceAnncAddress; - var template RequestPrimitive v_createAE := m_createAe(PX_TS_AE1.appId, omit, omit); - var template RequestPrimitive v_createAcp := m_createAcpBase; - var integer v_aeAnncIndex; - var integer v_resourceAnncIndex; - var integer v_acpIndex; - var XSD.ID v_membersAcpId; - - //Test control + //Local variables + var template RequestPrimitive v_request; + var integer v_cseBaseIndex := -1; + var integer v_aeIndex := -1; + var integer v_remoteCSEIndex := -1; + var integer v_originalResourceIndex, v_originalLocalResourceIndex := -1; + var XSD.ID v_originalResourceAddress; + var XSD.ID v_resourceAnncAddress; + var template RequestPrimitive v_createAE := m_createAe(PX_TS_AE1.appId, omit, omit); + var template RequestPrimitive v_createAcp := m_createAcpBase; + var integer v_aeAnncIndex; + var integer v_resourceAnncIndex; + var integer v_acpIndex; + var XSD.ID v_membersAcpId; + + //Test control - // Test component configuration - f_cf02Up(); + // Test component configuration + f_cf02Up(); - // Test adapter configuration + // Test adapter configuration - //Preamble - v_cseBaseIndex := f_getLatestLocalResourceIndex(vc_cse1); - //Register the CSE - vc_cse1.start(f_cse_registerRemoteCse(m_createRemoteCSE_poa(-, -, -, -, -, {f_getLocalPoA()}))); - f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + //Preamble + v_cseBaseIndex := f_getLatestLocalResourceIndex(vc_cse1); + //Register the CSE + vc_cse1.start(f_cse_registerRemoteCse(m_createRemoteCSE_poa(-, -, -, -, -, {f_getLocalPoA()}))); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); - v_remoteCSEIndex := f_getLatestResourceIndex(vc_cse1); + v_remoteCSEIndex := f_getLatestResourceIndex(vc_cse1); - //Creating resource in Hosting CSE - vc_cse1.start(f_generateAndSetLocalResource(valueof(p_originalResource), v_cseBaseIndex, p_resourceType)); - vc_cse1.done; + //Creating resource in Hosting CSE + vc_cse1.start(f_generateAndSetLocalResource(valueof(p_originalResource), v_cseBaseIndex, p_resourceType)); + vc_cse1.done; - v_originalResourceAddress := f_getLatestLocalResourceAddress(vc_cse1, -, e_spRelative); + v_originalResourceAddress := f_getLatestLocalResourceAddress(vc_cse1, -, e_spRelative); - v_originalResourceIndex := f_getLatestLocalResource(vc_cse1); + v_originalResourceIndex := f_getLatestLocalResource(vc_cse1); - v_originalLocalResourceIndex := f_getLatestLocalResourceIndex(vc_cse1); + v_originalLocalResourceIndex := f_getLatestLocalResourceIndex(vc_cse1); - v_aeIndex := f_cse_createResource(int2,v_createAE); + v_aeIndex := f_cse_createResource(int2,v_createAE); - v_acpIndex := f_cse_createResource(int1, v_createAcp, -); // AE child resource + v_acpIndex := f_cse_createResource(int1, v_createAcp, -); // AE child resource - if((p_resourceType == int3) or (p_resourceType == int9) or (p_resourceType == int29)) { - p_createRequestAnnc := f_setAcpId(p_createRequestAnnc, {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}); - } - p_createRequestAnnc.primitiveContent := f_setLink(valueof(p_createRequestAnnc.primitiveContent), v_originalResourceAddress); - p_createRequestAnnc.primitiveContent := f_setExpirationTime(valueof(p_createRequestAnnc.primitiveContent), vc_resourcesList[v_originalResourceIndex].resource); + if((p_resourceType == int3) or (p_resourceType == int9) or (p_resourceType == int29)) { + p_createRequestAnnc := f_setAcpId(p_createRequestAnnc, {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}); + } + p_createRequestAnnc.primitiveContent := f_setLink(valueof(p_createRequestAnnc.primitiveContent), v_originalResourceAddress); + p_createRequestAnnc.primitiveContent := f_setExpirationTime(valueof(p_createRequestAnnc.primitiveContent), vc_resourcesList[v_originalResourceIndex].resource); - vc_cse1.start(f_cse_createResource_cseSimu(f_getAnnouncedResourceType(p_resourceType), p_createRequestAnnc, v_remoteCSEIndex)); - f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + vc_cse1.start(f_cse_createResource_cseSimu(f_getAnnouncedResourceType(p_resourceType), p_createRequestAnnc, v_remoteCSEIndex)); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); - v_resourceAnncAddress := f_getLatestResourceAddress(vc_cse1, -, -); - v_resourceAnncIndex := f_getLatestResourceIndex(vc_cse1); + v_resourceAnncAddress := f_getLatestResourceAddress(vc_cse1, -, -); + v_resourceAnncIndex := f_getLatestResourceIndex(vc_cse1); - v_request := m_retrieve(v_resourceAnncAddress, f_getOriginator(v_aeIndex)); - v_request.resultContent := int7; - // Test Body - vc_cse1.start(f_cse_retrieveResourceHandler(v_originalLocalResourceIndex, -, -)); - f_send(e_mcaPort, m_request(valueof(v_request))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, vc_resourcesList[v_originalResourceIndex].resource))) -> value vc_response { - tc_ac.stop; - setverdict(pass, __SCOPE__, ": Resource " & int2str(enum2int(p_resourceType)) & " retrieved successfully"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { - tc_ac.stop; - setverdict(fail, __SCOPE__, ": Wrong response status code"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__, ": No answer while retrieving resource type " & int2str(enum2int(p_resourceType))); - } + v_request := m_retrieve(v_resourceAnncAddress, f_getOriginator(v_aeIndex)); + v_request.resultContent := int7; + // Test Body + vc_cse1.start(f_cse_retrieveResourceHandler(v_originalLocalResourceIndex, -, -)); + f_send(e_mcaPort, m_request(valueof(v_request))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, vc_resourcesList[v_originalResourceIndex].resource))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__, ": Resource " & int2str(enum2int(p_resourceType)) & " retrieved successfully"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__, ": Wrong response status code"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__, ": No answer while retrieving resource type " & int2str(enum2int(p_resourceType))); } + } - f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf02Down(); + // Tear down + f_cf02Down(); - } //end f_CSE_DMR_RET_026 + } //end f_CSE_DMR_RET_026 }//end group Retrieve group Update { - function f_CSE_DMR_UPD_001(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on AeSimu system CseSystem return ResponsePrimitive{ + function f_CSE_DMR_UPD_001(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on AeSimu system CseSystem return ResponsePrimitive{ - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var integer v_ae2Index := -1; - var integer v_parentIndex := -1; + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var integer v_ae2Index := -1; + var integer v_parentIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitive, p_resourceType); + f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitive, p_resourceType); - if(p_resourceType != int18) { - v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent - } - v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_parentIndex); + if(p_resourceType != int18) { + v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + } + v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_parentIndex); - // Test Body - v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive); - - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value vc_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Attribute of resource type " & int2str(enum2int(p_resourceType)) & " updated successfully"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while updating resource type " & int2str(enum2int(p_resourceType))); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(p_resourceType))); - } - } - - f_checkAeSimuStatus(); - - //Used to check that the resource has been updated - vc_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex); - - // Postamble - f_cse_postamble_deleteResources(); + // Test Body + v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive); - // Tear down - f_cf01Down(); + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Attribute of resource type " & int2str(enum2int(p_resourceType)) & " updated successfully"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while updating resource type " & int2str(enum2int(p_resourceType))); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(p_resourceType))); + } + } + + f_checkAeSimuStatus(); + + //Used to check that the resource has been updated + vc_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex); - return vc_response.primitive.responsePrimitive; + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + return vc_response.primitive.responsePrimitive; - }//end f_CSE_DMR_UPD_001 + }//end f_CSE_DMR_UPD_001 - function f_CSE_DMR_UPD_002(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on AeSimu system CseSystem return ResponsePrimitive { + function f_CSE_DMR_UPD_002(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on AeSimu system CseSystem return ResponsePrimitive { - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var integer v_ae2Index := -1; - var integer v_parentIndex := -1; + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var integer v_ae2Index := -1; + var integer v_parentIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitive, p_resourceType); + f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitive, p_resourceType); - if(p_resourceType != int18) { - v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent - } - v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_parentIndex); + if(p_resourceType != int18) { + v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + } + v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_parentIndex); - // Test Body - v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive); + // Test Body + v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive); - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value vc_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Attribute of resource type " & int2str(enum2int(p_resourceType)) & " updated successfully"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while updating resource type " & int2str(enum2int(p_resourceType))); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(p_resourceType))); - } - } + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Attribute of resource type " & int2str(enum2int(p_resourceType)) & " updated successfully"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while updating resource type " & int2str(enum2int(p_resourceType))); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(p_resourceType))); + } + } - //Used to check that the resource has been updated - vc_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex); + //Used to check that the resource has been updated + vc_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex); - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - return vc_response.primitive.responsePrimitive; + return vc_response.primitive.responsePrimitive; - }//end f_CSE_DMR_UPD_002 + }//end f_CSE_DMR_UPD_002 - function f_CSE_DMR_UPD_003(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive, template (omit) AttributeAux_list p_nullFields := omit) runs on AeSimu system CseSystem return ResponsePrimitive { + function f_CSE_DMR_UPD_003(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive, template (omit) AttributeAux_list p_nullFields := omit) runs on AeSimu system CseSystem return ResponsePrimitive { - // Local variables - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var integer v_ae2Index := -1; - var integer v_parentIndex := -1; + // Local variables + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var integer v_ae2Index := -1; + var integer v_parentIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitive, p_resourceType); + f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitive, p_resourceType); - if(p_resourceType != int18) { - v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent - } - v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_parentIndex); + if(p_resourceType != int18) { + v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + } + v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_parentIndex); - //f_match2PrimitiveContent(vc_resourcesList[v_resourceIndex].resource, p_createRequestPrimitive.primitiveContent); TODO fix the match problem + //f_match2PrimitiveContent(vc_resourcesList[v_resourceIndex].resource, p_createRequestPrimitive.primitiveContent); TODO fix the match problem - // Test Body - v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive); + // Test Body + v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive); - f_send(e_mcaPort, m_request(v_request, p_nullFields)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value vc_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Attribute of resource type " & int2str(enum2int(p_resourceType)) & " updated successfully"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while updating resource type " & int2str(enum2int(p_resourceType))); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(p_resourceType))); - } - } + f_send(e_mcaPort, m_request(v_request, p_nullFields)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Attribute of resource type " & int2str(enum2int(p_resourceType)) & " updated successfully"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while updating resource type " & int2str(enum2int(p_resourceType))); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(p_resourceType))); + } + } - vc_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex); + vc_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex); - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - return vc_response.primitive.responsePrimitive; + return vc_response.primitive.responsePrimitive; - }//end f_CSE_DMR_UPD_003 + }//end f_CSE_DMR_UPD_003 - function f_CSE_DMR_UPD_004(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive, template (omit) AttributeAux_list p_nullFields := omit) runs on AeSimu system CseSystem return ResponsePrimitive { + function f_CSE_DMR_UPD_004(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive, template (omit) AttributeAux_list p_nullFields := omit) runs on AeSimu system CseSystem return ResponsePrimitive { - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var integer v_ae2Index := -1; - var integer v_parentIndex := -1; + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var integer v_ae2Index := -1; + var integer v_parentIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitive, p_resourceType); + f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitive, p_resourceType); - if(p_resourceType != int18) { - v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent - } - v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_parentIndex); + if(p_resourceType != int18) { + v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + } + v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_parentIndex); - // Test Body - v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive); + // Test Body + v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive); - f_send(e_mcaPort, m_request(v_request, p_nullFields)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value vc_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Attribute of resource type " & int2str(enum2int(p_resourceType)) & " updated successfully"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while updating resource type " & int2str(enum2int(p_resourceType))); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(p_resourceType))); - } - } + f_send(e_mcaPort, m_request(v_request, p_nullFields)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Attribute of resource type " & int2str(enum2int(p_resourceType)) & " updated successfully"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while updating resource type " & int2str(enum2int(p_resourceType))); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(p_resourceType))); + } + } - vc_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex); + vc_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex); - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - return vc_response.primitive.responsePrimitive; + return vc_response.primitive.responsePrimitive; - }//end f_CSE_DMR_UPD_004 + }//end f_CSE_DMR_UPD_004 - function f_CSE_DMR_UPD_006(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on AeSimu system CseSystem { + function f_CSE_DMR_UPD_006(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var integer v_ae2Index := -1; - var integer v_parentIndex := -1; + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var integer v_ae2Index := -1; + var integer v_parentIndex := -1; - // Test control - if(not(PICS_ACP_SUPPORT)) { - setverdict(inconc, __SCOPE__ & ": AccessControlPolicy support is required to run this test case"); - stop; - } - - // Test component configuration - f_cf01Up(true); + // Test control + if(not(PICS_ACP_SUPPORT)) { + setverdict(inconc, __SCOPE__ & ": AccessControlPolicy support is required to run this test case"); + stop; + } - // Test adapter configuration + // Test component configuration + f_cf01Up(true); - // Preamble - f_cse_createAccessControlPolicyAux(-, -, int59);//c_CRDNDi) + // Test adapter configuration + + // Preamble + f_cse_createAccessControlPolicyAux(-, -, int59);//c_CRDNDi) - v_aeIndex := f_cse_preamble_registerAe(-, -); + v_aeIndex := f_cse_preamble_registerAe(-, -); - f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitive, p_resourceType); + f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitive, p_resourceType); - if(p_resourceType != int1) { - p_createRequestPrimitive := f_setAcpId(p_createRequestPrimitive,{f_getResourceId(vc_resourcesList[vc_acpIndex].resource)});//c_CRDNDi); - } - if(p_resourceType != int18) { - v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent - } - v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_parentIndex); + if(p_resourceType != int1) { + p_createRequestPrimitive := f_setAcpId(p_createRequestPrimitive,{f_getResourceId(vc_resourcesList[vc_acpIndex].resource)});//c_CRDNDi); + } + if(p_resourceType != int18) { + v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + } + v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_parentIndex); - // Test Body - v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive); + // Test Body + v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive); - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int4103))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Access denied to update attributes from resource type " & int2str(enum2int(p_resourceType))); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Updating attributes from resource without having privileges"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(p_resourceType))); - } - } + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4103))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Access denied to update attributes from resource type " & int2str(enum2int(p_resourceType))); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Updating attributes from resource without having privileges"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(p_resourceType))); + } + } - vc_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex); + vc_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex); - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_DMR_UPD_006 + }//end f_CSE_DMR_UPD_006 - function f_CSE_DMR_UPD_007(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on AeSimu system CseSystem { + function f_CSE_DMR_UPD_007(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var integer v_ae2Index := -1; - var integer v_parentIndex := -1; + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var integer v_ae2Index := -1; + var integer v_parentIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitive, p_resourceType); + f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitive, p_resourceType); - if(p_resourceType != int18) { - v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent - } - v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_parentIndex); + if(p_resourceType != int18) { + v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + } + v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_parentIndex); - // Test Body - v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive); + // Test Body + v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive); - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Operation not allowed. RO attribute from resource type " & int2str(enum2int(p_resourceType)) ); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Updating RO attribute from resource"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(p_resourceType))); - } - } + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Operation not allowed. RO attribute from resource type " & int2str(enum2int(p_resourceType)) ); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Updating RO attribute from resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(p_resourceType))); + } + } - vc_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex); + vc_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex); - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_DMR_UPD_007 + }//end f_CSE_DMR_UPD_007 - function f_CSE_DMR_UPD_008(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive, template (omit) AttributeAux_list p_nullFields := omit) runs on AeSimu system CseSystem { + function f_CSE_DMR_UPD_008(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive, template (omit) AttributeAux_list p_nullFields := omit) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var integer v_ae2Index := -1; - var integer v_parentIndex := -1; + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var integer v_ae2Index := -1; + var integer v_parentIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitive, p_resourceType); + f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitive, p_resourceType); - if(p_resourceType != int18) { - v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent - } - v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_parentIndex); + if(p_resourceType != int18) { + v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + } + v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_parentIndex); - // Test Body - v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive); + // Test Body + v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive); - f_send(e_mcaPort, m_request(v_request, p_nullFields)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Operation not allowed. Mandatory RW attribute from resource type " & int2str(enum2int(p_resourceType)) ); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Deleting a mandatory RW attribute from resource"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(p_resourceType))); - } - } + f_send(e_mcaPort, m_request(v_request, p_nullFields)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Operation not allowed. Mandatory RW attribute from resource type " & int2str(enum2int(p_resourceType)) ); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Deleting a mandatory RW attribute from resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(p_resourceType))); + } + } - vc_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex); + vc_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex); - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_DMR_UPD_008 + }//end f_CSE_DMR_UPD_008 - function f_CSE_DMR_UPD_009(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on AeSimu system CseSystem { + function f_CSE_DMR_UPD_009(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_ae2Index := -1; - var integer v_resourceIndex := -1; - var integer v_parentIndex := -1; + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_ae2Index := -1; + var integer v_resourceIndex := -1; + var integer v_parentIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitive, p_resourceType); + f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitive, p_resourceType); - if(p_resourceType != int18) { - v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent - } - v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive , v_parentIndex); + if(p_resourceType != int18) { + v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + } + v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive , v_parentIndex); - // Test Body - v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive); + // Test Body + v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive); - f_send(e_mcaPort, m_request(v_request)); + f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": It is not possible to update an unexisting attribute of resource type " & int2str(enum2int(p_resourceType))); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while updating an unexisting resource type " & int2str(enum2int(p_resourceType))); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(p_resourceType))); - } - } - - // Postamble - f_cse_postamble_deleteResources(); - - // Tear down - f_cf01Down(); - - }//end f_CSE_DMR_UPD_009 - - function f_CSE_DMR_UPD_010(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on AeSimu system CseSystem { - - // Local variables - var MsgIn v_response; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": It is not possible to update an unexisting attribute of resource type " & int2str(enum2int(p_resourceType))); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while updating an unexisting resource type " & int2str(enum2int(p_resourceType))); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(p_resourceType))); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + }//end f_CSE_DMR_UPD_009 + + function f_CSE_DMR_UPD_010(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on AeSimu system CseSystem { + + // Local variables + var MsgIn v_response; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_aeIndex); + v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_aeIndex); - // Test Body + // Test Body - f_cse_updateResource(p_resourceType, v_resourceIndex, p_updateRequestPrimitive); + f_cse_updateResource(p_resourceType, v_resourceIndex, p_updateRequestPrimitive); - f_send(e_mcaPort, m_request(m_retrieve(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex)))); + f_send(e_mcaPort, m_request(m_retrieve(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex)))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while retrieving resource attributes"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while retrieving resource attributes"); - } - } + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while retrieving resource attributes"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource attributes"); + } + } - vc_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex); + vc_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex); - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_DMR_UPD_010 + }//end f_CSE_DMR_UPD_010 - function f_CSE_DMR_UPD_011(ResourceType p_resourceTypeParent, template RequestPrimitive p_createParentRequestPrimitive, ResourceType p_resourceTypeChild, template RequestPrimitive p_createChildRequestPrimitive,template RequestPrimitive p_updateRequestPrimitive) runs on AeSimu system CseSystem { - //Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_parentIndex := -1; - var integer v_childIndex := -1; + function f_CSE_DMR_UPD_011(ResourceType p_resourceTypeParent, template RequestPrimitive p_createParentRequestPrimitive, ResourceType p_resourceTypeChild, template RequestPrimitive p_createChildRequestPrimitive,template RequestPrimitive p_updateRequestPrimitive) runs on AeSimu system CseSystem { + //Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_parentIndex := -1; + var integer v_childIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - v_parentIndex := f_cse_createResource(p_resourceTypeParent, p_createParentRequestPrimitive, v_aeIndex); + v_parentIndex := f_cse_createResource(p_resourceTypeParent, p_createParentRequestPrimitive, v_aeIndex); - v_childIndex := f_cse_createResource(p_resourceTypeChild, p_createChildRequestPrimitive, v_parentIndex); + v_childIndex := f_cse_createResource(p_resourceTypeChild, p_createChildRequestPrimitive, v_parentIndex); - //Test Body - v_request := f_getUpdateRequestPrimitive(p_resourceTypeChild, v_childIndex, p_updateRequestPrimitive); + //Test Body + v_request := f_getUpdateRequestPrimitive(p_resourceTypeChild, v_childIndex, p_updateRequestPrimitive); - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int4005))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Not allowed to update resource " & int2str(enum2int(p_resourceTypeChild)) & " with error OPERATION_NOT_ALLOWED"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Accepted update of resource " & int2str(enum2int(p_resourceTypeChild))); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while updating resource " & int2str(enum2int(p_resourceTypeChild))); - } - } + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4005))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Not allowed to update resource " & int2str(enum2int(p_resourceTypeChild)) & " with error OPERATION_NOT_ALLOWED"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Accepted update of resource " & int2str(enum2int(p_resourceTypeChild))); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while updating resource " & int2str(enum2int(p_resourceTypeChild))); + } + } - vc_primitiveContentRetrievedResource := f_cse_retrieveResource(v_childIndex); + vc_primitiveContentRetrievedResource := f_cse_retrieveResource(v_childIndex); - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_DMR_UPD_011 + }//end f_CSE_DMR_UPD_011 - function f_CSE_DMR_UPD_014(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive, in boolean p_acpsRequired := false) runs on AeSimu system CseSystem { + function f_CSE_DMR_UPD_014(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive, in boolean p_acpsRequired := false) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_resourceIndex := -1; - var integer v_ae2Index := -1; - var integer v_acp1Index := -1; - var integer v_acp2Index := -1; + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_resourceIndex := -1; + var integer v_ae2Index := -1; + var integer v_acp1Index := -1; + var integer v_acp2Index := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - vc_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + vc_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitive, p_resourceType); + f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitive, p_resourceType); - if (p_acpsRequired) { - v_acp1Index := f_cse_createResource(int1, m_createAcp("MyAcp1"), vc_aeIndex); - v_acp2Index := f_cse_createResource(int1, m_createAcp("MyAcp2"), vc_aeIndex); + if (p_acpsRequired) { + v_acp1Index := f_cse_createResource(int1, m_createAcp("MyAcp1"), vc_aeIndex); + v_acp2Index := f_cse_createResource(int1, m_createAcp("MyAcp2"), vc_aeIndex); - p_createRequestPrimitive := f_setAcpId(p_createRequestPrimitive,{f_getResourceId(vc_resourcesList[v_acp1Index].resource)}); - p_updateRequestPrimitive := f_setAcpId(p_updateRequestPrimitive,{f_getResourceId(vc_resourcesList[v_acp2Index].resource)}); + p_createRequestPrimitive := f_setAcpId(p_createRequestPrimitive,{f_getResourceId(vc_resourcesList[v_acp1Index].resource)}); + p_updateRequestPrimitive := f_setAcpId(p_updateRequestPrimitive,{f_getResourceId(vc_resourcesList[v_acp2Index].resource)}); - } + } - v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, vc_aeIndex); + v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, vc_aeIndex); - // Test Body - v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive); + // Test Body + v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive); - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value vc_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Attribute of resource type " & int2str(enum2int(p_resourceType)) & " updated successfully"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while updating resource type " & int2str(enum2int(p_resourceType))); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(p_resourceType))); - } - } + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Attribute of resource type " & int2str(enum2int(p_resourceType)) & " updated successfully"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while updating resource type " & int2str(enum2int(p_resourceType))); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(p_resourceType))); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_DMR_UPD_014 + }//end f_CSE_DMR_UPD_014 - function f_CSE_DMR_UPD_015(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive, boolean p_secondAcp := false) runs on AeSimu system CseSystem { - //Local variables - var MsgIn v_response; - var AcpType v_acpi; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var integer v_ae2Index := -1; - var integer v_acpIndex := -1; + function f_CSE_DMR_UPD_015(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive, boolean p_secondAcp := false) runs on AeSimu system CseSystem { + //Local variables + var MsgIn v_response; + var AcpType v_acpi; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var integer v_ae2Index := -1; + var integer v_acpIndex := -1; - // Test control + // Test control - // Test component configuration - if (p_resourceType!=int16){ //ResourceType != RemoteCSE - f_cf01Up(true); - } else { - f_cf02Up(); - } + // Test component configuration + if (p_resourceType!=int16){ //ResourceType != RemoteCSE + f_cf01Up(true); + } else { + f_cf02Up(); + } - // Test adapter configuration + // Test adapter configuration - // Preamble - if(p_resourceType != int1) { - f_cse_createAccessControlPolicyAux(-, -, -); - p_createRequestPrimitive := f_setAcpId(p_createRequestPrimitive, {vc_resourcesList[vc_acpIndex].resource.accessControlPolicy.resourceID}); - } + // Preamble + if(p_resourceType != int1) { + f_cse_createAccessControlPolicyAux(-, -, -); + p_createRequestPrimitive := f_setAcpId(p_createRequestPrimitive, {vc_resourcesList[vc_acpIndex].resource.accessControlPolicy.resourceID}); + } - if((p_resourceType != int2) and (p_resourceType != int1)) { - v_aeIndex := f_cse_preamble_registerAe({vc_resourcesList[vc_acpIndex].resource.accessControlPolicy.resourceID});//c_CRUDNDi); - } + if((p_resourceType != int2) and (p_resourceType != int1)) { + v_aeIndex := f_cse_preamble_registerAe({vc_resourcesList[vc_acpIndex].resource.accessControlPolicy.resourceID});//c_CRUDNDi); + } - if(p_secondAcp) {//A second ACP is required - v_acpIndex := f_cse_createResource(int1, m_createAcpBase); + if(p_secondAcp) {//A second ACP is required + v_acpIndex := f_cse_createResource(int1, m_createAcpBase); - v_acpi := {vc_resourcesList[v_acpIndex].resource.accessControlPolicy.resourceID}; + v_acpi := {vc_resourcesList[v_acpIndex].resource.accessControlPolicy.resourceID}; - if(p_resourceType == int9){ - if(ispresent(p_updateRequestPrimitive.primitiveContent.group_.membersAccessControlPolicyIDs)) { - p_updateRequestPrimitive.primitiveContent.group_.membersAccessControlPolicyIDs := v_acpi; - } else { - p_updateRequestPrimitive := f_setAcpId(p_updateRequestPrimitive, v_acpi); - } + if(p_resourceType == int9){ + if(ispresent(p_updateRequestPrimitive.primitiveContent.group_.membersAccessControlPolicyIDs)) { + p_updateRequestPrimitive.primitiveContent.group_.membersAccessControlPolicyIDs := v_acpi; } else { p_updateRequestPrimitive := f_setAcpId(p_updateRequestPrimitive, v_acpi); - } + } + } else { + p_updateRequestPrimitive := f_setAcpId(p_updateRequestPrimitive, v_acpi); } + } - if (p_resourceType!=int16){ //ResourceType != RemoteCSE + if (p_resourceType!=int16){ //ResourceType != RemoteCSE - f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitive, p_resourceType); + f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitive, p_resourceType); - v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive);//under the CSEBase resource - } else { //ResourceType = RemoteCSE - vc_cse1.start(f_cse_registerRemoteCse(p_createRequestPrimitive)); - f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive);//under the CSEBase resource + } else { //ResourceType = RemoteCSE + vc_cse1.start(f_cse_registerRemoteCse(p_createRequestPrimitive)); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); - v_resourceIndex := f_getRemoteCseResource(vc_cse1); - } + v_resourceIndex := f_getRemoteCseResource(vc_cse1); + } - //Test Body - vc_request.primitive.requestPrimitive := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive); + //Test Body + vc_request.primitive.requestPrimitive := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive); - f_send(e_mcaPort, m_request(vc_request.primitive.requestPrimitive)); //CSEBase - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value vc_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Attribute of resource type " & int2str(enum2int(p_resourceType)) & " updated successfully"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while updating optional attribute"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(p_resourceType))); - } + f_send(e_mcaPort, m_request(vc_request.primitive.requestPrimitive)); //CSEBase + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Attribute of resource type " & int2str(enum2int(p_resourceType)) & " updated successfully"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while updating optional attribute"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(p_resourceType))); } + } - vc_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex); + vc_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex); - //Postamble - f_cse_postamble_deleteResources(); + //Postamble + f_cse_postamble_deleteResources(); - // Tear down - if (p_resourceType!=int16){ //ResourceType != RemoteCSE - f_cf01Down(); - } else { - f_cf02Down(); - } + // Tear down + if (p_resourceType!=int16){ //ResourceType != RemoteCSE + f_cf01Down(); + } else { + f_cf02Down(); + } - } // end function f_CSE_DMR_UPD_015 + } // end function f_CSE_DMR_UPD_015 - function f_CSE_DMR_UPD_016(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on AeSimu system CseSystem { - //Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var ResponsePrimitive v_responsePrimitive; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var integer v_ae2Index := -1; + function f_CSE_DMR_UPD_016(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on AeSimu system CseSystem { + //Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var ResponsePrimitive v_responsePrimitive; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var integer v_ae2Index := -1; - // Test control + // Test control - // Test component configuration - if (p_resourceType!=int16){ //ResourceType != RemoteCSE - f_cf01Up(true); - } else { - f_cf02Up(); - } + // Test component configuration + if (p_resourceType!=int16){ //ResourceType != RemoteCSE + f_cf01Up(true); + } else { + f_cf02Up(); + } - // Test adapter configuration + // Test adapter configuration - // Preamble - if(p_resourceType != int2) { - v_aeIndex := f_cse_preamble_registerAe(-, {f_getLocalPoA(vc_aeSimuDesc.mcaPortIn, "")});//c_CRUDNDi); - } + // Preamble + if(p_resourceType != int2) { + v_aeIndex := f_cse_preamble_registerAe(-, {f_getLocalPoA(vc_aeSimuDesc.mcaPortIn, "")});//c_CRUDNDi); + } - if(p_resourceType != int1) { + if(p_resourceType != int1) { - f_cse_createAccessControlPolicyAux(-, -, -); + f_cse_createAccessControlPolicyAux(-, -, -); - p_createRequestPrimitive := f_setAcpId(p_createRequestPrimitive, {vc_resourcesList[vc_acpIndex].resource.accessControlPolicy.resourceID}); - } + p_createRequestPrimitive := f_setAcpId(p_createRequestPrimitive, {vc_resourcesList[vc_acpIndex].resource.accessControlPolicy.resourceID}); + } - if (p_resourceType!=int16){ //ResourceType != RemoteCSE - - f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitive, p_resourceType); - - v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive);//under the CSEBase resource - if(vc_ae2.running) { - vc_ae2.stop; - } - } else { //ResourceType = RemoteCSE - vc_cse1.start(f_cse_registerRemoteCse(p_createRequestPrimitive)); - f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + if (p_resourceType!=int16){ //ResourceType != RemoteCSE - v_resourceIndex := f_getRemoteCseResource(vc_cse1); + f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitive, p_resourceType); + + v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive);//under the CSEBase resource + if(vc_ae2.running) { + vc_ae2.stop; } + } else { //ResourceType = RemoteCSE + vc_cse1.start(f_cse_registerRemoteCse(p_createRequestPrimitive)); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + + v_resourceIndex := f_getRemoteCseResource(vc_cse1); + } - //Test Body - v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive); + //Test Body + v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive); - if((p_resourceType == int23) and (ispresent(v_request.primitiveContent.subscription.notificationURI))) { //Subscription - v_request.primitiveContent.subscription.notificationURI := {f_getResourceAddress(v_aeIndex)}; - } + if((p_resourceType == int23) and (ispresent(v_request.primitiveContent.subscription.notificationURI))) { //Subscription + v_request.primitiveContent.subscription.notificationURI := {f_getResourceAddress(v_aeIndex)}; + } - if(p_resourceType == int9) { - vc_ae2.start(f_cse_createResource_withAcpAux(int2, m_createAe(PX_TS_AE2.appId, {vc_resourcesList[vc_acpIndex].resource.accessControlPolicy.resourceID}, PX_TS_AE2.aeIdStem, c_defaultAe2ResourceName, {f_getLocalPoA(PX_TS_AE2.mcaPortIn, "")}), -1)); // AE2 is registred - f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + if(p_resourceType == int9) { + vc_ae2.start(f_cse_createResource_withAcpAux(int2, m_createAe(PX_TS_AE2.appId, {vc_resourcesList[vc_acpIndex].resource.accessControlPolicy.resourceID}, PX_TS_AE2.aeIdStem, c_defaultAe2ResourceName, {f_getLocalPoA(PX_TS_AE2.mcaPortIn, "")}), -1)); // AE2 is registred + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); - v_ae2Index := f_getResourceFromAeSimu(vc_ae2); + v_ae2Index := f_getResourceFromAeSimu(vc_ae2); - if(ispresent(v_request.primitiveContent.group_.memberIDs)) { - v_request.primitiveContent.group_.memberIDs := {f_getResourceId(vc_resourcesList[v_ae2Index].resource)}; - } + if(ispresent(v_request.primitiveContent.group_.memberIDs)) { + v_request.primitiveContent.group_.memberIDs := {f_getResourceId(vc_resourcesList[v_ae2Index].resource)}; } + } - f_send(e_mcaPort, m_request(v_request)); + f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value vc_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Attribute of resource type " & int2str(enum2int(p_resourceType)) & " updated successfully"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while updating mandatory attribute"); - } - [] mcaPortIn.receive(mw_request(mw_notifyNotification(mw_contentNotificationVerification))) -> value vc_request { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ":INFO: Notification for Subscription verification received"); - v_responsePrimitive := valueof(m_responseNotification(int2000, omit)); - v_responsePrimitive.requestIdentifier := vc_request.primitive.requestPrimitive.requestIdentifier; - f_send(e_mcaPortIn, m_response(v_responsePrimitive)); - tc_ac.start; - repeat; - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(p_resourceType))); - } + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Attribute of resource type " & int2str(enum2int(p_resourceType)) & " updated successfully"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while updating mandatory attribute"); + } + [] mcaPortIn.receive(mw_request(mw_notifyNotification(mw_contentNotificationVerification))) -> value vc_request { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ":INFO: Notification for Subscription verification received"); + v_responsePrimitive := valueof(m_responseNotification(int2000, omit)); + v_responsePrimitive.requestIdentifier := vc_request.primitive.requestPrimitive.requestIdentifier; + f_send(e_mcaPortIn, m_response(v_responsePrimitive)); + tc_ac.start; + repeat; + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(p_resourceType))); } + } - vc_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex); + vc_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex); - //Postamble - f_cse_postamble_deleteResources(); + //Postamble + f_cse_postamble_deleteResources(); - // Tear down - if (p_resourceType!=int16){ //ResourceType != RemoteCSE - f_cf01Down(); - } else { - f_cf02Down(); - } + // Tear down + if (p_resourceType!=int16){ //ResourceType != RemoteCSE + f_cf01Down(); + } else { + f_cf02Down(); + } - } //end function f_CSE_DMR_UPD_016 + } //end function f_CSE_DMR_UPD_016 function f_CSE_DMR_UPD_017(ResourceType p_resourceType, template RequestPrimitive p_requestCreatePrimitive, template RequestPrimitive p_createRequestAnnc, template RequestPrimitive p_requestUpdatePrimitive) runs on CseSimu system CseSystem { // Local variables @@ -6889,12 +6889,12 @@ module OneM2M_PermutationFunctions { // Test adapter configuration // Register the CSE - f_cse_registerRemoteCse(m_createRemoteCSEBase); + f_cse_registerRemoteCse(m_createRemoteCSEBase); //Preamble - vc_ae1.start(f_cse_createResource(int2,v_create)); - f_cse_announcementProcedure_createHandler(mw_createAEAnnc(-, -, -)); + vc_ae1.start(f_cse_createResource(int2,v_create)); + f_cse_announcementProcedure_createHandler(mw_createAEAnnc(-, -, -)); f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1); v_aeIndex:= f_getLatestResourceIndex(vc_ae1); @@ -6917,9 +6917,9 @@ module OneM2M_PermutationFunctions { tc_ac.stop; setverdict(pass, __SCOPE__ & ":INFO: CREATE REQUEST received"); - if(match(v_request.primitive.requestPrimitive.to_, f_getLocalResourceAddress(lengthof(vc_localResourcesList)-1, e_hierarchical, e_spRelative)) or - match(v_request.primitive.requestPrimitive.to_, f_getLocalResourceAddress(lengthof(vc_localResourcesList)-1, e_nonHierarchical, e_spRelative))) { - setverdict(pass, __SCOPE__ & ":matching ANNC_PARENT_RESOURCE_ADDRESS"); + if(match(v_request.primitive.requestPrimitive.to_, f_getLocalResourceAddress(lengthof(vc_localResourcesList)-1, e_hierarchical, e_spRelative)) or + match(v_request.primitive.requestPrimitive.to_, f_getLocalResourceAddress(lengthof(vc_localResourcesList)-1, e_nonHierarchical, e_spRelative))) { + setverdict(pass, __SCOPE__ & ":matching ANNC_PARENT_RESOURCE_ADDRESS"); } else { setverdict(fail, __SCOPE__ & ":mis-matching ANNC_PARENT_RESOURCE_ADDRESS"); } @@ -6958,12 +6958,12 @@ module OneM2M_PermutationFunctions { // Test adapter configuration // Register the CSE - f_cse_registerRemoteCse(m_createRemoteCSEBase); + f_cse_registerRemoteCse(m_createRemoteCSEBase); //Preamble - vc_ae1.start(f_cse_createResource(int2,v_create)); - f_cse_announcementProcedure_createHandler(mw_createAEAnnc(-, -, -)); + vc_ae1.start(f_cse_createResource(int2,v_create)); + f_cse_announcementProcedure_createHandler(mw_createAEAnnc(-, -, -)); f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1); v_aeIndex := f_getLatestResourceIndex(vc_ae1); @@ -6973,7 +6973,7 @@ module OneM2M_PermutationFunctions { } vc_ae1.start(f_cse_createResource(p_resourceType, p_requestCreatePrimitive, v_parentIndex)); - f_cse_announcementProcedure_createHandler(p_createRequestAnnc); + f_cse_announcementProcedure_createHandler(p_createRequestAnnc); f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1); v_latestResourceIndex := f_getLatestResourceIndex(vc_ae1); @@ -6991,7 +6991,7 @@ module OneM2M_PermutationFunctions { v_responsePrimitive := valueof(m_responsePrimitive(int2004,v_request.primitive.requestPrimitive.requestIdentifier)); v_responsePrimitive.from_ := vc_cseSimuDesc.cseId; v_responsePrimitive.to_ := v_request.primitive.requestPrimitive.from_; - f_send(e_mccPortIn, m_response(v_responsePrimitive)); + f_send(e_mccPortIn, m_response(v_responsePrimitive)); } [] tc_ac.timeout { setverdict(fail, __SCOPE__ & ":ERROR: No announcement received"); @@ -7025,7 +7025,7 @@ module OneM2M_PermutationFunctions { // Preamble v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); // Test Body v_updateRequest.primitiveContent.container.labels := {"VALUE_1"}; @@ -7038,7 +7038,7 @@ module OneM2M_PermutationFunctions { tc_ac.stop; setverdict(pass, __SCOPE__ & ": Request successfully rejected"); } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { tc_ac.stop; setverdict(fail, __SCOPE__ & ": Wrong response status code"); } @@ -7049,7 +7049,7 @@ module OneM2M_PermutationFunctions { [] tc_ac.timeout { setverdict(fail, __SCOPE__ & ": No answer while updating resource"); } - } + } // Postamble f_cse_postamble_deleteResources(); @@ -7061,598 +7061,598 @@ module OneM2M_PermutationFunctions { function f_CSE_DMR_UPD_020(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template ResourceType p_childResourceType, template RequestPrimitive p_childRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_ae2Index := -1; - var integer v_resourceIndex := -1; - var integer v_childResourceIndex := -1; - var integer v_parentIndex := -1; + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_ae2Index := -1; + var integer v_resourceIndex := -1; + var integer v_childResourceIndex := -1; + var integer v_parentIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - if(isvalue(p_childResourceType)) { - if(valueof(p_childResourceType) == int23) { - f_cse_preamble_subscriptionVerification(v_ae2Index, p_childRequestPrimitive, valueof(p_childResourceType)); - } else { - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, valueof(p_resourceType)); - } - } - - if(p_resourceType != int18) { - v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + if(isvalue(p_childResourceType)) { + if(valueof(p_childResourceType) == int23) { + f_cse_preamble_subscriptionVerification(v_ae2Index, p_childRequestPrimitive, valueof(p_childResourceType)); + } else { + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, valueof(p_resourceType)); } - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); + } + + if(p_resourceType != int18) { + v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + } + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); - if(p_resourceType != int15) { - v_childResourceIndex := f_cse_createResource(valueof(p_childResourceType), p_childRequestPrimitive, v_resourceIndex); - } + if(p_resourceType != int15) { + v_childResourceIndex := f_cse_createResource(valueof(p_childResourceType), p_childRequestPrimitive, v_resourceIndex); + } - // Test Body - v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive); - v_request.resultContent := int0;//Nothing - if(valueof(p_childResourceType) == int23) { - if (vc_ae2.running) { - vc_ae2.stop; - } - vc_ae2.start(f_cse_notifyProcedure_defaultHandler()); + // Test Body + v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive); + v_request.resultContent := int0;//Nothing + if(valueof(p_childResourceType) == int23) { + if (vc_ae2.running) { + vc_ae2.stop; } - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004, omit))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Nothing provided with RCN set to " & int2str(enum2int(v_request.resultContent))); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(omit))) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Some content provided with RCN set to " & int2str(enum2int(v_request.resultContent))); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while updating resource"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while updating resource"); - } - } + vc_ae2.start(f_cse_notifyProcedure_defaultHandler()); + } + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004, omit))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Nothing provided with RCN set to " & int2str(enum2int(v_request.resultContent))); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(omit))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Some content provided with RCN set to " & int2str(enum2int(v_request.resultContent))); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while updating resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while updating resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_DMR_UPD_020 + }//end f_CSE_DMR_UPD_020 function f_CSE_DMR_UPD_021(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse, template ResourceType p_childResourceType, template RequestPrimitive p_childRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_ae2Index := -1; - var integer v_resourceIndex := -1; - var integer v_childResourceIndex := -1; - var integer v_parentIndex := -1; + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_ae2Index := -1; + var integer v_resourceIndex := -1; + var integer v_childResourceIndex := -1; + var integer v_parentIndex := -1; - // Test control - - // Test component configuration - f_cf01Up(true); + // Test control - // Test adapter configuration + // Test component configuration + f_cf01Up(true); - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Test adapter configuration - if(isvalue(p_childResourceType)) { - if(valueof(p_childResourceType) == int23) { - f_cse_preamble_subscriptionVerification(v_ae2Index, p_childRequestPrimitive, valueof(p_childResourceType)); - } else { - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, valueof(p_resourceType)); - } - } - - if(p_resourceType != int18) { - v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent - } - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - if(p_resourceType != int15) { - v_childResourceIndex := f_cse_createResource(valueof(p_childResourceType), p_childRequestPrimitive, v_resourceIndex); - } - - // Test Body - v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive); - v_request.resultContent := int1;//Attributes + if(isvalue(p_childResourceType)) { if(valueof(p_childResourceType) == int23) { - if (vc_ae2.running) { - vc_ae2.stop; - } - vc_ae2.start(f_cse_notifyProcedure_defaultHandler()); + f_cse_preamble_subscriptionVerification(v_ae2Index, p_childRequestPrimitive, valueof(p_childResourceType)); + } else { + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, valueof(p_resourceType)); } - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004, p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": All attributes provided with RCN set to " & int2str(enum2int(v_request.resultContent))); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong content provided with RCN set to " & int2str(enum2int(v_request.resultContent))); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while updating resource"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while updating resource"); - } - } - - // Postamble - f_cse_postamble_deleteResources(); - - // Tear down - f_cf01Down(); - - }//end f_CSE_DMR_UPD_021 + } - function f_CSE_DMR_UPD_022(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse, template ResourceType p_childResourceType, template RequestPrimitive p_childRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on AeSimu system CseSystem { + if(p_resourceType != int18) { + v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + } + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_ae2Index := -1; - var integer v_resourceIndex := -1; - var integer v_childResourceIndex := -1; - var integer v_parentIndex := -1; + if(p_resourceType != int15) { + v_childResourceIndex := f_cse_createResource(valueof(p_childResourceType), p_childRequestPrimitive, v_resourceIndex); + } + + // Test Body + v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive); + v_request.resultContent := int1;//Attributes + if(valueof(p_childResourceType) == int23) { + if (vc_ae2.running) { + vc_ae2.stop; + } + vc_ae2.start(f_cse_notifyProcedure_defaultHandler()); + } + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004, p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": All attributes provided with RCN set to " & int2str(enum2int(v_request.resultContent))); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong content provided with RCN set to " & int2str(enum2int(v_request.resultContent))); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while updating resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while updating resource"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + }//end f_CSE_DMR_UPD_021 + + function f_CSE_DMR_UPD_022(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse, template ResourceType p_childResourceType, template RequestPrimitive p_childRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on AeSimu system CseSystem { + + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_ae2Index := -1; + var integer v_resourceIndex := -1; + var integer v_childResourceIndex := -1; + var integer v_parentIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - if(isvalue(p_childResourceType)) { - if(valueof(p_childResourceType) == int23) { - f_cse_preamble_subscriptionVerification(v_ae2Index, p_childRequestPrimitive, valueof(p_childResourceType)); - } else { - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, valueof(p_resourceType)); - } - } - - if(p_resourceType != int18) { - v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + if(isvalue(p_childResourceType)) { + if(valueof(p_childResourceType) == int23) { + f_cse_preamble_subscriptionVerification(v_ae2Index, p_childRequestPrimitive, valueof(p_childResourceType)); + } else { + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, valueof(p_resourceType)); } - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); + } + + if(p_resourceType != int18) { + v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + } + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); - if(p_resourceType != int15) { - v_childResourceIndex := f_cse_createResource(valueof(p_childResourceType), p_childRequestPrimitive, v_resourceIndex); - } + if(p_resourceType != int15) { + v_childResourceIndex := f_cse_createResource(valueof(p_childResourceType), p_childRequestPrimitive, v_resourceIndex); + } - // Test Body - v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive); - v_request.resultContent := int9;//Modified Attributes - if(valueof(p_childResourceType) == int23) { - if (vc_ae2.running) { - vc_ae2.stop; - } - vc_ae2.start(f_cse_notifyProcedure_defaultHandler()); + // Test Body + v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive); + v_request.resultContent := int9;//Modified Attributes + if(valueof(p_childResourceType) == int23) { + if (vc_ae2.running) { + vc_ae2.stop; } - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004, p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Only modified attributes provided with RCN set to " & int2str(enum2int(v_request.resultContent))); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong content provided with RCN set to " & int2str(enum2int(v_request.resultContent))); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while updating resource"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while updating resource"); - } - } + vc_ae2.start(f_cse_notifyProcedure_defaultHandler()); + } + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004, p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Only modified attributes provided with RCN set to " & int2str(enum2int(v_request.resultContent))); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong content provided with RCN set to " & int2str(enum2int(v_request.resultContent))); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while updating resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while updating resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_DMR_UPD_022 + }//end f_CSE_DMR_UPD_022 }//end group Update group Delete { - function f_CSE_DMR_DEL_001(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_parentIndex := -1; - var integer v_containerIndex := -1; - var integer v_resourceIndex := -1; - var integer v_ae2Index := -1; + function f_CSE_DMR_DEL_001(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive) runs on AeSimu system CseSystem { + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_parentIndex := -1; + var integer v_containerIndex := -1; + var integer v_resourceIndex := -1; + var integer v_ae2Index := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi) + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi) - f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitive, p_resourceType); + f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitive, p_resourceType); - if(p_resourceType == int4) { - v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); - v_parentIndex := v_containerIndex; - } else if(p_resourceType != int18) { - v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent - } + if(p_resourceType == int4) { + v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + v_parentIndex := v_containerIndex; + } else if(p_resourceType != int18) { + v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + } - v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_parentIndex); + v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_parentIndex); - // Test Body - if(p_resourceType == int23) { - if (vc_ae2.running) { - vc_ae2.stop; - } - vc_ae2.start(f_cse_notifyProcedure_noNotificationHandler()); + // Test Body + if(p_resourceType == int23) { + if (vc_ae2.running) { + vc_ae2.stop; } + vc_ae2.start(f_cse_notifyProcedure_noNotificationHandler()); + } - v_request := valueof(m_delete(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))); + v_request := valueof(m_delete(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))); - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2002))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Resource" & int2str(enum2int(p_resourceType)) & " deleted successfully"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while deleting resource type " & int2str(enum2int(p_resourceType))); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while deleting resource type " & int2str(enum2int(p_resourceType))); - } - } + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2002))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Resource" & int2str(enum2int(p_resourceType)) & " deleted successfully"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while deleting resource type " & int2str(enum2int(p_resourceType))); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while deleting resource type " & int2str(enum2int(p_resourceType))); + } + } - f_checkAeSimuStatus(); + f_checkAeSimuStatus(); - //Check to see if the resource is present or not - if (f_cse_isResourceNotPresent(v_aeIndex, f_getResourceName(vc_resourcesList[v_resourceIndex].resource))){ - setverdict(pass, __SCOPE__ & ":INFO: Resource deleted"); - } else { - setverdict(fail, __SCOPE__ & ":ERROR: Resource not deleted"); - } + //Check to see if the resource is present or not + if (f_cse_isResourceNotPresent(v_aeIndex, f_getResourceName(vc_resourcesList[v_resourceIndex].resource))){ + setverdict(pass, __SCOPE__ & ":INFO: Resource deleted"); + } else { + setverdict(fail, __SCOPE__ & ":ERROR: Resource not deleted"); + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - };//end f_CSE_DMR_DEL_001 + };//end f_CSE_DMR_DEL_001 - function f_CSE_DMR_DEL_002(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var RequestPrimitive v_updateRequest; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var integer v_ae2Index := -1; - var integer v_parentIndex := -1; + function f_CSE_DMR_DEL_002(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive) runs on AeSimu system CseSystem { + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var RequestPrimitive v_updateRequest; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var integer v_ae2Index := -1; + var integer v_parentIndex := -1; - // Test control - if(not(PICS_ACP_SUPPORT)) { - setverdict(inconc, __SCOPE__ & ": AccessControlPolicy support is required to run this test case"); - stop; - } + // Test control + if(not(PICS_ACP_SUPPORT)) { + setverdict(inconc, __SCOPE__ & ": AccessControlPolicy support is required to run this test case"); + stop; + } - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe(-, -);//c_CRUNDi); - f_cse_createAccessControlPolicyAux(-, {f_getResourceId(vc_resourcesList[v_aeIndex].resource)},int55);//c_CRDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe(-, -);//c_CRUNDi); + f_cse_createAccessControlPolicyAux(-, {f_getResourceId(vc_resourcesList[v_aeIndex].resource)},int55);//c_CRDNDi); - f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitive, p_resourceType); + f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitive, p_resourceType); - //Adjustments for ACP resource type - if(p_resourceType == int1) { - p_createRequestPrimitive.primitiveContent.accessControlPolicy.selfPrivileges.accessControlRule_list := {m_createAcr({f_getResourceId(vc_resourcesList[v_aeIndex].resource)}, int55)}; - } else { - p_createRequestPrimitive := f_setAcpId(p_createRequestPrimitive, {f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}); - } + //Adjustments for ACP resource type + if(p_resourceType == int1) { + p_createRequestPrimitive.primitiveContent.accessControlPolicy.selfPrivileges.accessControlRule_list := {m_createAcr({f_getResourceId(vc_resourcesList[v_aeIndex].resource)}, int55)}; + } else { + p_createRequestPrimitive := f_setAcpId(p_createRequestPrimitive, {f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}); + } - //Creation of resource - if(p_resourceType != int18) { - v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent - } - v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_parentIndex); + //Creation of resource + if(p_resourceType != int18) { + v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + } + v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_parentIndex); - // Test Body - v_request := valueof(m_delete(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))); - v_request.from_ := f_getOriginator(v_aeIndex); + // Test Body + v_request := valueof(m_delete(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))); + v_request.from_ := f_getOriginator(v_aeIndex); - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int4103))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Access denied to delete the resource " & int2str(enum2int(p_resourceType))); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error resource deleted without having privileges"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while deleting resource type " & int2str(enum2int(p_resourceType))); - } - } - - f_checkAeSimuStatus(); - - //Check if the resource has been deleted or not - if(f_cse_isResourcePresent(v_resourceIndex)) { - setverdict(pass, __SCOPE__ & ":INFO: Resource not deleted"); - } else { - setverdict(fail, __SCOPE__ & ":INFO: Resource deleted"); + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4103))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Access denied to delete the resource " & int2str(enum2int(p_resourceType))); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error resource deleted without having privileges"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while deleting resource type " & int2str(enum2int(p_resourceType))); } + } - // Postamble - f_cse_postamble_deleteResources(); + f_checkAeSimuStatus(); - // Tear down - f_cf01Down(); + //Check if the resource has been deleted or not + if(f_cse_isResourcePresent(v_resourceIndex)) { + setverdict(pass, __SCOPE__ & ":INFO: Resource not deleted"); + } else { + setverdict(fail, __SCOPE__ & ":INFO: Resource deleted"); + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); - };//end f_CSE_DMR_DEL_002 + };//end f_CSE_DMR_DEL_002 - function f_CSE_DMR_DEL_004(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, ResourceType p_childResourceType, template RequestPrimitive p_createRequestPrimitiveChildResource) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var integer v_childResourceIndex := -1; - var integer v_ae2Index := -1; - var integer v_parentIndex := -1; + function f_CSE_DMR_DEL_004(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, ResourceType p_childResourceType, template RequestPrimitive p_createRequestPrimitiveChildResource) runs on AeSimu system CseSystem { + // Local variables + var MsgIn v_response; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var integer v_childResourceIndex := -1; + var integer v_ae2Index := -1; + var integer v_parentIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitive, p_resourceType); + f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitive, p_resourceType); - if(p_resourceType != int18) { - v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent - } - v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_parentIndex); + if(p_resourceType != int18) { + v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + } + v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_parentIndex); - f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitiveChildResource, p_childResourceType); + f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitiveChildResource, p_childResourceType); - v_childResourceIndex := f_cse_createResource(p_childResourceType, p_createRequestPrimitiveChildResource, v_resourceIndex); + v_childResourceIndex := f_cse_createResource(p_childResourceType, p_createRequestPrimitiveChildResource, v_resourceIndex); - if((p_resourceType == int23) or (p_childResourceType == int23)) { - vc_ae2.start(f_cse_notifyProcedure_defaultHandler()); - } + if((p_resourceType == int23) or (p_childResourceType == int23)) { + vc_ae2.start(f_cse_notifyProcedure_defaultHandler()); + } - f_cse_deleteResource(v_resourceIndex); + f_cse_deleteResource(v_resourceIndex); - // Test Body - f_send(e_mcaPort, m_request(m_delete(f_getResourceAddress(v_childResourceIndex), f_getOriginator(v_childResourceIndex)))); + // Test Body + f_send(e_mcaPort, m_request(m_delete(f_getResourceAddress(v_childResourceIndex), f_getOriginator(v_childResourceIndex)))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int4004))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Error while deleting non existing resource"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while deleting non existing resource"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while deleting resource"); - } - } + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4004))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Error while deleting non existing resource"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while deleting non existing resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while deleting resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - };//end f_CSE_DMR_DEL_004 + };//end f_CSE_DMR_DEL_004 - function f_CSE_DMR_DEL_005(ResourceType p_resourceTypeParent, template RequestPrimitive p_requestPrimitiveParent, ResourceType p_resourceTypeChild, template RequestPrimitive p_requestPrimitiveChild) runs on AeSimu system CseSystem { - //Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var integer v_childResourceIndex := -1; + function f_CSE_DMR_DEL_005(ResourceType p_resourceTypeParent, template RequestPrimitive p_requestPrimitiveParent, ResourceType p_resourceTypeChild, template RequestPrimitive p_requestPrimitiveChild) runs on AeSimu system CseSystem { + //Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var integer v_childResourceIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - v_resourceIndex := f_cse_createResource(p_resourceTypeParent, p_requestPrimitiveParent, v_aeIndex); + v_resourceIndex := f_cse_createResource(p_resourceTypeParent, p_requestPrimitiveParent, v_aeIndex); - v_childResourceIndex := f_cse_createResource(p_resourceTypeChild, p_requestPrimitiveChild, v_resourceIndex); + v_childResourceIndex := f_cse_createResource(p_resourceTypeChild, p_requestPrimitiveChild, v_resourceIndex); - // Test Body - f_send(e_mcaPort, m_request(m_delete(f_getResourceAddress(v_childResourceIndex), f_getOriginator(v_childResourceIndex)))); + // Test Body + f_send(e_mcaPort, m_request(m_delete(f_getResourceAddress(v_childResourceIndex), f_getOriginator(v_childResourceIndex)))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2002))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Resource type " & int2str(enum2int(p_resourceTypeChild)) & " deleted successfully"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while deleting resource type " & int2str(enum2int(p_resourceTypeChild))); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while deleting resource type " & int2str(enum2int(p_resourceTypeChild))); - } - } + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2002))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Resource type " & int2str(enum2int(p_resourceTypeChild)) & " deleted successfully"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while deleting resource type " & int2str(enum2int(p_resourceTypeChild))); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while deleting resource type " & int2str(enum2int(p_resourceTypeChild))); + } + } - vc_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex); + vc_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex); - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - };//end f_CSE_DMR_DEL_005 + };//end f_CSE_DMR_DEL_005 - function f_CSE_DMR_DEL_006(ResourceType p_resourceTypeParent, template RequestPrimitive p_requestPrimitiveParent, ResourceType p_resourceTypeChild, template RequestPrimitive p_requestPrimitiveChild) runs on AeSimu system CseSystem { - //Local variables - var integer v_aeIndex := -1; - var integer v_parentIndex := -1; - var integer v_childIndex := -1; - var PrimitiveContent v_attributesParent, v_attributesParent_afterDeletion; + function f_CSE_DMR_DEL_006(ResourceType p_resourceTypeParent, template RequestPrimitive p_requestPrimitiveParent, ResourceType p_resourceTypeChild, template RequestPrimitive p_requestPrimitiveChild) runs on AeSimu system CseSystem { + //Local variables + var integer v_aeIndex := -1; + var integer v_parentIndex := -1; + var integer v_childIndex := -1; + var PrimitiveContent v_attributesParent, v_attributesParent_afterDeletion; - // Test control + // Test control - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - v_parentIndex := f_cse_createResource(p_resourceTypeParent, p_requestPrimitiveParent, v_aeIndex); + v_parentIndex := f_cse_createResource(p_resourceTypeParent, p_requestPrimitiveParent, v_aeIndex); - v_childIndex := f_cse_createResource(p_resourceTypeChild, p_requestPrimitiveChild, v_parentIndex); + v_childIndex := f_cse_createResource(p_resourceTypeChild, p_requestPrimitiveChild, v_parentIndex); - v_attributesParent := f_cse_retrieveResource(v_parentIndex); + v_attributesParent := f_cse_retrieveResource(v_parentIndex); - if (p_resourceTypeParent==int3){ //Container - if(not(ispresent(v_attributesParent.container.currentNrOfInstances))) { - setverdict(fail, __SCOPE__ & ": Error the currentNrOfInstances attribute is empty"); - f_checkAeSimuStatus(); - } - }else if (p_resourceTypeParent==int29){ //TimeSeries - if(not(ispresent(v_attributesParent.timeSeries.currentNrOfInstances))) { - setverdict(fail, __SCOPE__ & ": Error the currentNrOfInstances attribute is empty"); - f_checkAeSimuStatus(); - } - } + if (p_resourceTypeParent==int3){ //Container + if(not(ispresent(v_attributesParent.container.currentNrOfInstances))) { + setverdict(fail, __SCOPE__ & ": Error the currentNrOfInstances attribute is empty"); + f_checkAeSimuStatus(); + } + }else if (p_resourceTypeParent==int29){ //TimeSeries + if(not(ispresent(v_attributesParent.timeSeries.currentNrOfInstances))) { + setverdict(fail, __SCOPE__ & ": Error the currentNrOfInstances attribute is empty"); + f_checkAeSimuStatus(); + } + } - // Test Body - f_cse_deleteResource(v_childIndex); + // Test Body + f_cse_deleteResource(v_childIndex); - v_attributesParent_afterDeletion := f_cse_retrieveResource(v_parentIndex); + v_attributesParent_afterDeletion := f_cse_retrieveResource(v_parentIndex); - if (p_resourceTypeParent==int3){ //Container - if(not(ispresent(v_attributesParent_afterDeletion.container.currentNrOfInstances))) { - setverdict(fail, __SCOPE__ & ": Error the currentNrOfInstances attribute is empty"); - f_checkAeSimuStatus(); - } - }else if (p_resourceTypeParent==int29){ //TimeSeries - if(not(ispresent(v_attributesParent_afterDeletion.timeSeries.currentNrOfInstances))) { - setverdict(fail, __SCOPE__ & ": Error the currentNrOfInstances attribute is empty"); - f_checkAeSimuStatus(); - } - } + if (p_resourceTypeParent==int3){ //Container + if(not(ispresent(v_attributesParent_afterDeletion.container.currentNrOfInstances))) { + setverdict(fail, __SCOPE__ & ": Error the currentNrOfInstances attribute is empty"); + f_checkAeSimuStatus(); + } + }else if (p_resourceTypeParent==int29){ //TimeSeries + if(not(ispresent(v_attributesParent_afterDeletion.timeSeries.currentNrOfInstances))) { + setverdict(fail, __SCOPE__ & ": Error the currentNrOfInstances attribute is empty"); + f_checkAeSimuStatus(); + } + } - if (p_resourceTypeParent==int3){ //Container - if((v_attributesParent.container.currentNrOfInstances > v_attributesParent_afterDeletion.container.currentNrOfInstances) and - (v_attributesParent.container.currentByteSize > v_attributesParent_afterDeletion.container.currentByteSize)) { - setverdict(pass, __SCOPE__ & ": The currentNrOfInstances and currentByteSize attributes are decreased"); - } else { - setverdict(fail, __SCOPE__ & ": currentNrOfInstances and/or currentByteSize attributes are not decreased"); - } - }else if (p_resourceTypeParent==int29){ //TimeSeries - if((v_attributesParent.timeSeries.currentNrOfInstances > v_attributesParent_afterDeletion.timeSeries.currentNrOfInstances) and - (v_attributesParent.timeSeries.currentByteSize > v_attributesParent_afterDeletion.timeSeries.currentByteSize)) { - setverdict(pass, __SCOPE__ & ": The currentNrOfInstances and currentByteSize attributes are decreased"); - } else { - setverdict(fail, __SCOPE__ & ": currentNrOfInstances and/or currentByteSize attributes are not decreased"); - } + if (p_resourceTypeParent==int3){ //Container + if((v_attributesParent.container.currentNrOfInstances > v_attributesParent_afterDeletion.container.currentNrOfInstances) and + (v_attributesParent.container.currentByteSize > v_attributesParent_afterDeletion.container.currentByteSize)) { + setverdict(pass, __SCOPE__ & ": The currentNrOfInstances and currentByteSize attributes are decreased"); + } else { + setverdict(fail, __SCOPE__ & ": currentNrOfInstances and/or currentByteSize attributes are not decreased"); + } + }else if (p_resourceTypeParent==int29){ //TimeSeries + if((v_attributesParent.timeSeries.currentNrOfInstances > v_attributesParent_afterDeletion.timeSeries.currentNrOfInstances) and + (v_attributesParent.timeSeries.currentByteSize > v_attributesParent_afterDeletion.timeSeries.currentByteSize)) { + setverdict(pass, __SCOPE__ & ": The currentNrOfInstances and currentByteSize attributes are decreased"); + } else { + setverdict(fail, __SCOPE__ & ": currentNrOfInstances and/or currentByteSize attributes are not decreased"); } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); - };//end f_CSE_DMR_DEL_006 + // Tear down + f_cf01Down(); + };//end f_CSE_DMR_DEL_006 function f_CSE_DMR_DEL_011(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, ResultContent p_resultContent) runs on AeSimu system CseSystem { @@ -7672,7 +7672,7 @@ module OneM2M_PermutationFunctions { // Preamble v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex); // Test Body v_request := valueof(m_delete(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))); @@ -7685,7 +7685,7 @@ module OneM2M_PermutationFunctions { tc_ac.stop; setverdict(pass, __SCOPE__ & ": Request successfully rejected"); } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { tc_ac.stop; setverdict(fail, __SCOPE__ & ": Wrong response status code"); } @@ -7696,7 +7696,7 @@ module OneM2M_PermutationFunctions { [] tc_ac.timeout { setverdict(fail, __SCOPE__ & ": No answer while deleting resource"); } - } + } // Postamble f_cse_postamble_deleteResources(); @@ -7708,447 +7708,447 @@ module OneM2M_PermutationFunctions { function f_CSE_DMR_DEL_012(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template ResourceType p_childResourceType, template RequestPrimitive p_childRequestPrimitive) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_ae2Index := -1; - var integer v_resourceIndex := -1; - var integer v_childResourceIndex := -1; - var integer v_parentIndex := -1; + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_ae2Index := -1; + var integer v_resourceIndex := -1; + var integer v_childResourceIndex := -1; + var integer v_parentIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - if(isvalue(p_childResourceType)) { - if(valueof(p_childResourceType) == int23) { - f_cse_preamble_subscriptionVerification(v_ae2Index, p_childRequestPrimitive, valueof(p_childResourceType)); - } else { - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, valueof(p_resourceType)); - } - } + if(isvalue(p_childResourceType)) { + if(valueof(p_childResourceType) == int23) { + f_cse_preamble_subscriptionVerification(v_ae2Index, p_childRequestPrimitive, valueof(p_childResourceType)); + } else { + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, valueof(p_resourceType)); + } + } - if(p_resourceType != int18) { - v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent - } - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); + if(p_resourceType != int18) { + v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + } + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); - if(p_resourceType != int15) { - v_childResourceIndex := f_cse_createResource(valueof(p_childResourceType), p_childRequestPrimitive, v_resourceIndex); - } + if(p_resourceType != int15) { + v_childResourceIndex := f_cse_createResource(valueof(p_childResourceType), p_childRequestPrimitive, v_resourceIndex); + } - // Test Body - v_request := valueof(m_delete(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))); - v_request.resultContent := int0;//Nothing + // Test Body + v_request := valueof(m_delete(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))); + v_request.resultContent := int0;//Nothing - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2002, omit))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Nothing provided with RCN set to " & int2str(enum2int(v_request.resultContent))); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(omit))) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Some content provided with RCN set to " & int2str(enum2int(v_request.resultContent))); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while deleting resource"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while deleting resource"); - } - } + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2002, omit))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Nothing provided with RCN set to " & int2str(enum2int(v_request.resultContent))); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(omit))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Some content provided with RCN set to " & int2str(enum2int(v_request.resultContent))); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while deleting resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while deleting resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_DMR_DEL_012 + }//end f_CSE_DMR_DEL_012 function f_CSE_DMR_DEL_013(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse, template ResourceType p_childResourceType, template RequestPrimitive p_childRequestPrimitive) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_ae2Index := -1; - var integer v_resourceIndex := -1; - var integer v_childResourceIndex := -1; - var integer v_parentIndex := -1; + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_ae2Index := -1; + var integer v_resourceIndex := -1; + var integer v_childResourceIndex := -1; + var integer v_parentIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - if(isvalue(p_childResourceType)) { - if(valueof(p_childResourceType) == int23) { - f_cse_preamble_subscriptionVerification(v_ae2Index, p_childRequestPrimitive, valueof(p_childResourceType)); - } else { - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, valueof(p_resourceType)); - } - } - - if(p_resourceType != int18) { - v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + if(isvalue(p_childResourceType)) { + if(valueof(p_childResourceType) == int23) { + f_cse_preamble_subscriptionVerification(v_ae2Index, p_childRequestPrimitive, valueof(p_childResourceType)); + } else { + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, valueof(p_resourceType)); } - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); + } + + if(p_resourceType != int18) { + v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + } + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); - if(p_resourceType != int15) { - v_childResourceIndex := f_cse_createResource(valueof(p_childResourceType), p_childRequestPrimitive, v_resourceIndex); - } + if(p_resourceType != int15) { + v_childResourceIndex := f_cse_createResource(valueof(p_childResourceType), p_childRequestPrimitive, v_resourceIndex); + } - // Test Body - v_request := valueof(m_delete(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))); - v_request.resultContent := int1;//Attributes + // Test Body + v_request := valueof(m_delete(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))); + v_request.resultContent := int1;//Attributes - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2002, p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": All attributes provided with RCN set to " & int2str(enum2int(v_request.resultContent))); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong content provided with RCN set to " & int2str(enum2int(v_request.resultContent))); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while deleting resource"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while deleting resource"); - } - } + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2002, p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": All attributes provided with RCN set to " & int2str(enum2int(v_request.resultContent))); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong content provided with RCN set to " & int2str(enum2int(v_request.resultContent))); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while deleting resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while deleting resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_DMR_DEL_013 + }//end f_CSE_DMR_DEL_013 function f_CSE_DMR_DEL_014(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse, template ResourceType p_childResourceType, template RequestPrimitive p_childRequestPrimitive) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_ae2Index := -1; - var integer v_resourceIndex := -1; - var integer v_childResourceIndex := -1; - var integer v_parentIndex := -1; + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_ae2Index := -1; + var integer v_resourceIndex := -1; + var integer v_childResourceIndex := -1; + var integer v_parentIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - if(isvalue(p_childResourceType)) { - if(valueof(p_childResourceType) == int23) { - f_cse_preamble_subscriptionVerification(v_ae2Index, p_childRequestPrimitive, valueof(p_childResourceType)); - } else { - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, valueof(p_resourceType)); - } - } - - if(p_resourceType != int18) { - v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + if(isvalue(p_childResourceType)) { + if(valueof(p_childResourceType) == int23) { + f_cse_preamble_subscriptionVerification(v_ae2Index, p_childRequestPrimitive, valueof(p_childResourceType)); + } else { + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, valueof(p_resourceType)); } - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); + } + + if(p_resourceType != int18) { + v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + } + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); - if(p_resourceType != int15) { - v_childResourceIndex := f_cse_createResource(valueof(p_childResourceType), p_childRequestPrimitive, v_resourceIndex); - } + if(p_resourceType != int15) { + v_childResourceIndex := f_cse_createResource(valueof(p_childResourceType), p_childRequestPrimitive, v_resourceIndex); + } - // Test Body - v_request := valueof(m_delete(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))); - v_request.resultContent := int4;//Attributes and child resources + // Test Body + v_request := valueof(m_delete(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))); + v_request.resultContent := int4;//Attributes and child resources - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2002, p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": All attributes provided with RCN set to " & int2str(enum2int(v_request.resultContent))); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong content provided with RCN set to " & int2str(enum2int(v_request.resultContent))); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while deleting resource"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while deleting resource"); - } - } + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2002, p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": All attributes provided with RCN set to " & int2str(enum2int(v_request.resultContent))); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong content provided with RCN set to " & int2str(enum2int(v_request.resultContent))); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while deleting resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while deleting resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_DMR_DEL_014 + }//end f_CSE_DMR_DEL_014 function f_CSE_DMR_DEL_015(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse, template ResourceType p_childResourceType, template RequestPrimitive p_childRequestPrimitive) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_ae2Index := -1; - var integer v_resourceIndex := -1; - var integer v_childResourceIndex := -1; - var integer v_parentIndex := -1; + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_ae2Index := -1; + var integer v_resourceIndex := -1; + var integer v_childResourceIndex := -1; + var integer v_parentIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - if(isvalue(p_childResourceType)) { - if(valueof(p_childResourceType) == int23) { - f_cse_preamble_subscriptionVerification(v_ae2Index, p_childRequestPrimitive, valueof(p_childResourceType)); - } else { - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, valueof(p_resourceType)); - } - } - - if(p_resourceType != int18) { - v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + if(isvalue(p_childResourceType)) { + if(valueof(p_childResourceType) == int23) { + f_cse_preamble_subscriptionVerification(v_ae2Index, p_childRequestPrimitive, valueof(p_childResourceType)); + } else { + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, valueof(p_resourceType)); } - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); + } + + if(p_resourceType != int18) { + v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + } + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); - if(p_resourceType != int15) { - v_childResourceIndex := f_cse_createResource(valueof(p_childResourceType), p_childRequestPrimitive, v_resourceIndex); - } - - // Test Body - v_request := valueof(m_delete(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))); - v_request.resultContent := int5;//Attributes and child resource references + if(p_resourceType != int15) { + v_childResourceIndex := f_cse_createResource(valueof(p_childResourceType), p_childRequestPrimitive, v_resourceIndex); + } - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2002, p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": All attributes provided with RCN set to " & int2str(enum2int(v_request.resultContent))); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong content provided with RCN set to " & int2str(enum2int(v_request.resultContent))); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while deleting resource"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while deleting resource"); - } - } + // Test Body + v_request := valueof(m_delete(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))); + v_request.resultContent := int5;//Attributes and child resource references - // Postamble - f_cse_postamble_deleteResources(); - - // Tear down - f_cf01Down(); - - }//end f_CSE_DMR_DEL_015 - - function f_CSE_DMR_DEL_016(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse, template ResourceType p_childResourceType, template RequestPrimitive p_childRequestPrimitive) runs on AeSimu system CseSystem { + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2002, p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": All attributes provided with RCN set to " & int2str(enum2int(v_request.resultContent))); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong content provided with RCN set to " & int2str(enum2int(v_request.resultContent))); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while deleting resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while deleting resource"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_ae2Index := -1; - var integer v_resourceIndex := -1; - var integer v_childResourceIndex := -1; - var integer v_parentIndex := -1; + // Tear down + f_cf01Down(); + + }//end f_CSE_DMR_DEL_015 + + function f_CSE_DMR_DEL_016(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse, template ResourceType p_childResourceType, template RequestPrimitive p_childRequestPrimitive) runs on AeSimu system CseSystem { + + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_ae2Index := -1; + var integer v_resourceIndex := -1; + var integer v_childResourceIndex := -1; + var integer v_parentIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - if(isvalue(p_childResourceType)) { - if(valueof(p_childResourceType) == int23) { - f_cse_preamble_subscriptionVerification(v_ae2Index, p_childRequestPrimitive, valueof(p_childResourceType)); - } else { - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, valueof(p_resourceType)); - } - } - - if(p_resourceType != int18) { - v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + if(isvalue(p_childResourceType)) { + if(valueof(p_childResourceType) == int23) { + f_cse_preamble_subscriptionVerification(v_ae2Index, p_childRequestPrimitive, valueof(p_childResourceType)); + } else { + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, valueof(p_resourceType)); } - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); + } + + if(p_resourceType != int18) { + v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + } + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); - if(p_resourceType != int15) { - v_childResourceIndex := f_cse_createResource(valueof(p_childResourceType), p_childRequestPrimitive, v_resourceIndex); - } + if(p_resourceType != int15) { + v_childResourceIndex := f_cse_createResource(valueof(p_childResourceType), p_childRequestPrimitive, v_resourceIndex); + } - // Test Body - v_request := valueof(m_delete(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))); - v_request.resultContent := int6;//Child resource references + // Test Body + v_request := valueof(m_delete(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))); + v_request.resultContent := int6;//Child resource references - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2002, p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": All attributes provided with RCN set to " & int2str(enum2int(v_request.resultContent))); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong content provided with RCN set to " & int2str(enum2int(v_request.resultContent))); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while deleting resource"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while deleting resource"); - } - } + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2002, p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": All attributes provided with RCN set to " & int2str(enum2int(v_request.resultContent))); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong content provided with RCN set to " & int2str(enum2int(v_request.resultContent))); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while deleting resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while deleting resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_DMR_DEL_016 + }//end f_CSE_DMR_DEL_016 function f_CSE_DMR_DEL_017(ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse, template ResourceType p_childResourceType, template RequestPrimitive p_childRequestPrimitive) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_ae2Index := -1; - var integer v_resourceIndex := -1; - var integer v_childResourceIndex := -1; - var integer v_parentIndex := -1; + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_ae2Index := -1; + var integer v_resourceIndex := -1; + var integer v_childResourceIndex := -1; + var integer v_parentIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - if(isvalue(p_childResourceType)) { - if(valueof(p_childResourceType) == int23) { - f_cse_preamble_subscriptionVerification(v_ae2Index, p_childRequestPrimitive, valueof(p_childResourceType)); - } else { - f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, valueof(p_resourceType)); - } - } - - if(p_resourceType != int18) { - v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + if(isvalue(p_childResourceType)) { + if(valueof(p_childResourceType) == int23) { + f_cse_preamble_subscriptionVerification(v_ae2Index, p_childRequestPrimitive, valueof(p_childResourceType)); + } else { + f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, valueof(p_resourceType)); } - v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); + } + + if(p_resourceType != int18) { + v_parentIndex := v_aeIndex;//For resources that can have AE resource as parent + } + v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_parentIndex); - if(p_resourceType != int15) { - v_childResourceIndex := f_cse_createResource(valueof(p_childResourceType), p_childRequestPrimitive, v_resourceIndex); - } + if(p_resourceType != int15) { + v_childResourceIndex := f_cse_createResource(valueof(p_childResourceType), p_childRequestPrimitive, v_resourceIndex); + } - // Test Body - v_request := valueof(m_delete(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))); - v_request.resultContent := int8;//Child resources + // Test Body + v_request := valueof(m_delete(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))); + v_request.resultContent := int8;//Child resources - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2002, p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": All attributes provided with RCN set to " & int2str(enum2int(v_request.resultContent))); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong content provided with RCN set to " & int2str(enum2int(v_request.resultContent))); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while deleting resource"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while deleting resource"); - } - } + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2002, p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": All attributes provided with RCN set to " & int2str(enum2int(v_request.resultContent))); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong content provided with RCN set to " & int2str(enum2int(v_request.resultContent))); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while deleting resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while deleting resource"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - }//end f_CSE_DMR_DEL_017 + }//end f_CSE_DMR_DEL_017 }//end group Delete @@ -8170,483 +8170,482 @@ module OneM2M_PermutationFunctions { group Basic_Operations { - function f_CSE_GMG_001(template RequestPrimitive p_requestPrimitive, in ResponseStatusCode p_responseStatusCode) runs on AeSimu system CseSystem { - // Local variables - var integer v_aeIndex := -1; - var integer v_acpIndex := -1; - var integer v_containerIndex_1 := -1; - var integer v_containerIndex_2 := -1; - var integer v_groupIndex := -1; - var integer i; - var ListOfURIs v_memberIDs; - var AcpType v_membersAcpIds; - var template RequestPrimitive v_createAcp := m_createAcpBase; + function f_CSE_GMG_001(template RequestPrimitive p_requestPrimitive, in ResponseStatusCode p_responseStatusCode) runs on AeSimu system CseSystem { + // Local variables + var integer v_aeIndex := -1; + var integer v_acpIndex := -1; + var integer v_containerIndex_1 := -1; + var integer v_containerIndex_2 := -1; + var integer v_groupIndex := -1; + var integer i; + var ListOfURIs v_memberIDs; + var AcpType v_membersAcpIds; + var template RequestPrimitive v_createAcp := m_createAcpBase; - // Test control - if(not(PICS_ACP_SUPPORT)) { - setverdict(inconc, __SCOPE__ & ": AccessControlPolicy support is required to run this test case"); - stop; - } + // Test control + if(not(PICS_ACP_SUPPORT)) { + setverdict(inconc, __SCOPE__ & ": AccessControlPolicy support is required to run this test case"); + stop; + } - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe(-, -); //c_CRUDNDi - v_acpIndex := f_cse_createResource(int1, v_createAcp, v_aeIndex); // AE child resource - v_containerIndex_1 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource - v_containerIndex_2 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource - v_memberIDs := {f_getResourceId(vc_resourcesList[v_containerIndex_1].resource), f_getResourceId(vc_resourcesList[v_containerIndex_2].resource)}; - v_membersAcpIds := {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}; - v_groupIndex := f_cse_createResource(int9, m_createGroup(2, v_memberIDs, omit, int3, -, v_membersAcpIds, -), v_aeIndex); // AE child resource + // Preamble + v_aeIndex := f_cse_preamble_registerAe(-, -); //c_CRUDNDi + v_acpIndex := f_cse_createResource(int1, v_createAcp, v_aeIndex); // AE child resource + v_containerIndex_1 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource + v_containerIndex_2 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource + v_memberIDs := {f_getResourceId(vc_resourcesList[v_containerIndex_1].resource), f_getResourceId(vc_resourcesList[v_containerIndex_2].resource)}; + v_membersAcpIds := {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}; + v_groupIndex := f_cse_createResource(int9, m_createGroup(2, v_memberIDs, omit, int3, -, v_membersAcpIds, -), v_aeIndex); // AE child resource - p_requestPrimitive.to_ := f_getResourceAddress(v_groupIndex) & "/fopt"; - p_requestPrimitive.from_ := f_getOriginator(v_groupIndex); - p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); + p_requestPrimitive.to_ := f_getResourceAddress(v_groupIndex) & "/fopt"; + p_requestPrimitive.from_ := f_getOriginator(v_groupIndex); + p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); - // Test Body + // Test Body - f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value vc_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Operation performed successfully by using fanOutPoint in the Group resource"); + f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Operation performed successfully by using fanOutPoint in the Group resource"); - if(not ispresent(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list)){ - setverdict(fail, __SCOPE__ & ": Error, aggregatedResponse element not provided"); - } - else { - for(i:=0; i<lengthof(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list); i := i+1){ - if(not match(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list[i], mw_responsePrimitive(p_responseStatusCode))){ - setverdict(fail, __SCOPE__ & ": Error, one responsePrimitve of aggregatedResponse is not successful"); - } - } - } - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while performing the operation"); + if(not ispresent(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list)){ + setverdict(fail, __SCOPE__ & ": Error, aggregatedResponse element not provided"); } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while performing the operation"); + else { + for(i:=0; i<lengthof(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list); i := i+1){ + if(not match(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list[i], mw_responsePrimitive(p_responseStatusCode))){ + setverdict(fail, __SCOPE__ & ": Error, one responsePrimitve of aggregatedResponse is not successful"); + } + } } } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while performing the operation"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while performing the operation"); + } + } - // Postamble - f_cse_postamble_deleteResources(); - - // Tear down - f_cf01Down(); + // Postamble + f_cse_postamble_deleteResources(); - } // end f_CSE_GMG_001 + // Tear down + f_cf01Down(); - function f_CSE_GMG_002(template RequestPrimitive p_requestPrimitive, in AccessControlOperations p_accessControlOperations) runs on AeSimu system CseSystem { - // Local variables - var integer v_aeIndex := -1; - var integer v_acpIndex := -1; - var integer v_containerIndex_1 := -1; - var integer v_containerIndex_2 := -1; - var integer v_groupIndex := -1; - var ListOfURIs v_memberIDs; - var ListOfURIs v_membersAcpIds; - var template RequestPrimitive v_createAcp := m_createAcp(-, -, p_accessControlOperations); + } // end f_CSE_GMG_001 - // Test control - if(not(PICS_ACP_SUPPORT)) { - setverdict(inconc, __SCOPE__ & ": AccessControlPolicy support is required to run this test case"); - stop; - } + function f_CSE_GMG_002(template RequestPrimitive p_requestPrimitive, in AccessControlOperations p_accessControlOperations) runs on AeSimu system CseSystem { + // Local variables + var integer v_aeIndex := -1; + var integer v_acpIndex := -1; + var integer v_containerIndex_1 := -1; + var integer v_containerIndex_2 := -1; + var integer v_groupIndex := -1; + var ListOfURIs v_memberIDs; + var ListOfURIs v_membersAcpIds; + var template RequestPrimitive v_createAcp := m_createAcp(-, -, p_accessControlOperations); - // Test component configuration - f_cf01Up(); + // Test control + if(not(PICS_ACP_SUPPORT)) { + setverdict(inconc, __SCOPE__ & ": AccessControlPolicy support is required to run this test case"); + stop; + } - // Test adapter configuration + // Test component configuration + f_cf01Up(); + + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe(-, -); //c_CRUDNDi - v_acpIndex := f_cse_createResource(int1, v_createAcp, v_aeIndex); // AE child resource - v_containerIndex_1 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource - v_containerIndex_2 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource - v_memberIDs := {f_getResourceId(vc_resourcesList[v_containerIndex_1].resource), f_getResourceId(vc_resourcesList[v_containerIndex_2].resource)}; - v_membersAcpIds := {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}; - v_groupIndex := f_cse_createResource(int9, m_createGroup(2, v_memberIDs, omit, int3, -, v_membersAcpIds), v_aeIndex); // AE child resource + // Preamble + v_aeIndex := f_cse_preamble_registerAe(-, -); //c_CRUDNDi + v_acpIndex := f_cse_createResource(int1, v_createAcp, v_aeIndex); // AE child resource + v_containerIndex_1 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource + v_containerIndex_2 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource + v_memberIDs := {f_getResourceId(vc_resourcesList[v_containerIndex_1].resource), f_getResourceId(vc_resourcesList[v_containerIndex_2].resource)}; + v_membersAcpIds := {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}; + v_groupIndex := f_cse_createResource(int9, m_createGroup(2, v_memberIDs, omit, int3, -, v_membersAcpIds), v_aeIndex); // AE child resource - p_requestPrimitive.to_ := f_getResourceAddress(v_groupIndex) & "/fopt"; - p_requestPrimitive.from_ := f_getOriginator(v_groupIndex); - p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); + p_requestPrimitive.to_ := f_getResourceAddress(v_groupIndex) & "/fopt"; + p_requestPrimitive.from_ := f_getOriginator(v_groupIndex); + p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); - // Test Body + // Test Body - f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int4103))) -> value vc_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Operation failed due to lack of privilege"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error, operation successful while no privileges"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while executing operation"); - } + f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4103))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Operation failed due to lack of privilege"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error, operation successful while no privileges"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while executing operation"); } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - } // end f_CSE_GMG_002 + } // end f_CSE_GMG_002 - function f_CSE_GMG_003(template RequestPrimitive p_requestPrimitive, in ResponseStatusCode p_responseStatusCode) runs on AeSimu system CseSystem { - // Local variables - var integer v_aeIndex := -1; - var integer v_acpIndex := -1; - var integer v_containerIndex_1 := -1; - var integer v_containerIndex_2 := -1; - var integer v_groupIndex := -1; - var integer i; - var ListOfURIs v_memberIDs; - var ListOfURIs v_acpIds; - var template RequestPrimitive v_createAcp := m_createAcpBase; + function f_CSE_GMG_003(template RequestPrimitive p_requestPrimitive, in ResponseStatusCode p_responseStatusCode) runs on AeSimu system CseSystem { + // Local variables + var integer v_aeIndex := -1; + var integer v_acpIndex := -1; + var integer v_containerIndex_1 := -1; + var integer v_containerIndex_2 := -1; + var integer v_groupIndex := -1; + var integer i; + var ListOfURIs v_memberIDs; + var ListOfURIs v_acpIds; + var template RequestPrimitive v_createAcp := m_createAcpBase; - // Test control - if(not(PICS_ACP_SUPPORT)) { - setverdict(inconc, __SCOPE__ & ": AccessControlPolicy support is required to run this test case"); - stop; - } + // Test control + if(not(PICS_ACP_SUPPORT)) { + setverdict(inconc, __SCOPE__ & ": AccessControlPolicy support is required to run this test case"); + stop; + } - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe(-, -); //c_CRUDNDi - v_acpIndex := f_cse_createResource(int1, v_createAcp, v_aeIndex); // AE child resource - v_containerIndex_1 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource - v_containerIndex_2 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource - v_memberIDs := {f_getResourceId(vc_resourcesList[v_containerIndex_1].resource), f_getResourceId(vc_resourcesList[v_containerIndex_2].resource)}; - v_acpIds := {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}; - v_groupIndex := f_cse_createResource(int9, m_createGroup(2, v_memberIDs, v_acpIds, int3, -, -), v_aeIndex); // AE child resource - - p_requestPrimitive.to_ := f_getResourceAddress(v_groupIndex) & "/fopt"; - p_requestPrimitive.from_ := f_getOriginator(v_groupIndex); - p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); + // Preamble + v_aeIndex := f_cse_preamble_registerAe(-, -); //c_CRUDNDi + v_acpIndex := f_cse_createResource(int1, v_createAcp, v_aeIndex); // AE child resource + v_containerIndex_1 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource + v_containerIndex_2 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource + v_memberIDs := {f_getResourceId(vc_resourcesList[v_containerIndex_1].resource), f_getResourceId(vc_resourcesList[v_containerIndex_2].resource)}; + v_acpIds := {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}; + v_groupIndex := f_cse_createResource(int9, m_createGroup(2, v_memberIDs, v_acpIds, int3, -, -), v_aeIndex); // AE child resource + + p_requestPrimitive.to_ := f_getResourceAddress(v_groupIndex) & "/fopt"; + p_requestPrimitive.from_ := f_getOriginator(v_groupIndex); + p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); - // Test Body + // Test Body - f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value vc_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Operation performed successfully by using fanOutPoint in group resource"); + f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Operation performed successfully by using fanOutPoint in group resource"); - if(not ispresent(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list)){ - setverdict(fail, __SCOPE__ & ": Error, aggregatedResponse element not provided"); - } - else { - for(i:=0; i<lengthof(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list); i := i+1){ - if(not match(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list[i], mw_responsePrimitive(p_responseStatusCode))){ - setverdict(fail, __SCOPE__ & ": Error, one responsePrimitve of aggregatedResponse is not successful"); - } - } - } - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); + if(not ispresent(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list)){ + setverdict(fail, __SCOPE__ & ": Error, aggregatedResponse element not provided"); } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while performing the operation"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while performing the operation"); + else { + for(i:=0; i<lengthof(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list); i := i+1){ + if(not match(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list[i], mw_responsePrimitive(p_responseStatusCode))){ + setverdict(fail, __SCOPE__ & ": Error, one responsePrimitve of aggregatedResponse is not successful"); + } + } } } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while performing the operation"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while performing the operation"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - } // end f_CSE_GMG_003 + } // end f_CSE_GMG_003 - function f_CSE_GMG_004(template RequestPrimitive p_requestPrimitive, in AccessControlOperations p_accessControlOperations) runs on AeSimu system CseSystem { - // Local variables - var integer v_aeIndex := -1; - var integer v_acpIndex := -1; - var integer v_containerIndex_1 := -1; - var integer v_containerIndex_2 := -1; - var integer v_groupIndex := -1; - var ListOfURIs v_memberIDs; - var AcpType v_acpIDs; - var template RequestPrimitive v_createAcp := m_createAcp(-, -, p_accessControlOperations); + function f_CSE_GMG_004(template RequestPrimitive p_requestPrimitive, in AccessControlOperations p_accessControlOperations) runs on AeSimu system CseSystem { + // Local variables + var integer v_aeIndex := -1; + var integer v_acpIndex := -1; + var integer v_containerIndex_1 := -1; + var integer v_containerIndex_2 := -1; + var integer v_groupIndex := -1; + var ListOfURIs v_memberIDs; + var AcpType v_acpIDs; + var template RequestPrimitive v_createAcp := m_createAcp(-, -, p_accessControlOperations); - // Test control - if(not(PICS_ACP_SUPPORT)) { - setverdict(inconc, __SCOPE__ & ": AccessControlPolicy support is required to run this test case"); - stop; - } + // Test control + if(not(PICS_ACP_SUPPORT)) { + setverdict(inconc, __SCOPE__ & ": AccessControlPolicy support is required to run this test case"); + stop; + } - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe(-, -); //c_CRUDNDi - v_acpIndex := f_cse_createResource(int1, v_createAcp, v_aeIndex); // AE child resource - v_containerIndex_1 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource - v_containerIndex_2 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource - v_memberIDs := {f_getResourceId(vc_resourcesList[v_containerIndex_1].resource), f_getResourceId(vc_resourcesList[v_containerIndex_2].resource)}; - v_acpIDs := {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}; - v_groupIndex := f_cse_createResource(int9, m_createGroup(2, v_memberIDs, v_acpIDs, int3), v_aeIndex); // AE child resource + // Preamble + v_aeIndex := f_cse_preamble_registerAe(-, -); //c_CRUDNDi + v_acpIndex := f_cse_createResource(int1, v_createAcp, v_aeIndex); // AE child resource + v_containerIndex_1 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource + v_containerIndex_2 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource + v_memberIDs := {f_getResourceId(vc_resourcesList[v_containerIndex_1].resource), f_getResourceId(vc_resourcesList[v_containerIndex_2].resource)}; + v_acpIDs := {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}; + v_groupIndex := f_cse_createResource(int9, m_createGroup(2, v_memberIDs, v_acpIDs, int3), v_aeIndex); // AE child resource - p_requestPrimitive.to_ := f_getResourceAddress(v_groupIndex) & "/fopt"; - p_requestPrimitive.from_ := f_getOriginator(v_groupIndex); - p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); + p_requestPrimitive.to_ := f_getResourceAddress(v_groupIndex) & "/fopt"; + p_requestPrimitive.from_ := f_getOriginator(v_groupIndex); + p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); - // Test Body + // Test Body - f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int4103))) -> value vc_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Operation failed due to lack of privilege"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error, operation successful while no privileges"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while executing operation"); - } + f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4103))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Operation failed due to lack of privilege"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error, operation successful while no privileges"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while executing operation"); } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - } // end f_CSE_GMG_004 + } // end f_CSE_GMG_004 - function f_CSE_GMG_005(template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse := omit) runs on AeSimu system CseSystem { - //Local constants - const integer c_numberOfResponsePrimitive := 2; + function f_CSE_GMG_005(template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse := omit) runs on AeSimu system CseSystem { + //Local constants + const integer c_numberOfResponsePrimitive := 2; - // Local variables - var integer v_acpIndex, v_aeIndex_1, v_aeIndex_2 := -1; - var integer v_groupIndex := -1; - var ListOfURIs v_memberIDs; - var AcpType v_acpIds; - var integer i; - var template RequestPrimitive v_createAcp := m_createAcp("PermissionForEveryone", -, -); + // Local variables + var integer v_acpIndex, v_aeIndex_1, v_aeIndex_2 := -1; + var integer v_groupIndex := -1; + var ListOfURIs v_memberIDs; + var AcpType v_acpIds; + var integer i; + var template RequestPrimitive v_createAcp := m_createAcp("PermissionForEveryone", -, -); - // Test control - if(not(PICS_ACP_SUPPORT)) { - setverdict(inconc, __SCOPE__ & ": AccessControlPolicy support is required to run this test case"); - stop; - } + // Test control + if(not(PICS_ACP_SUPPORT)) { + setverdict(inconc, __SCOPE__ & ": AccessControlPolicy support is required to run this test case"); + stop; + } - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_acpIndex := f_cse_createResource(int1, v_createAcp, -); // AE child resource + // Preamble + v_acpIndex := f_cse_createResource(int1, v_createAcp, -); // AE child resource - v_acpIds := {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}; + v_acpIds := {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}; - v_aeIndex_1 := f_cse_preamble_registerAe(v_acpIds, -); //c_CRUDNDi + v_aeIndex_1 := f_cse_preamble_registerAe(v_acpIds, -); //c_CRUDNDi - //vc_ae2.start(f_cse_createAccessControlPolicyAux("PermissionForAE1",{"all"}, int63)); - //f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + //vc_ae2.start(f_cse_createAccessControlPolicyAux("PermissionForAE1",{"all"}, int63)); + //f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); - vc_ae2.start(f_cse_createResource(int2, m_createAe(PX_TS_AE2.appId, v_acpIds, PX_TS_AE2.aeIdStem, c_defaultAe2ResourceName, omit), -1)); // AE2 is registred - f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + vc_ae2.start(f_cse_createResource(int2, m_createAe(PX_TS_AE2.appId, v_acpIds, PX_TS_AE2.aeIdStem, c_defaultAe2ResourceName, omit), -1)); // AE2 is registred + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); - v_aeIndex_2 := f_getLatestResource(vc_ae2); + v_aeIndex_2 := f_getLatestResource(vc_ae2); - v_memberIDs := {f_getResourceId(vc_resourcesList[v_aeIndex_1].resource), f_getResourceId(vc_resourcesList[v_aeIndex_2].resource)}; - v_groupIndex := f_cse_createResource(int9, m_createGroup(2, v_memberIDs, omit, int2, -, v_acpIds), v_aeIndex_1); // AE child resource + v_memberIDs := {f_getResourceId(vc_resourcesList[v_aeIndex_1].resource), f_getResourceId(vc_resourcesList[v_aeIndex_2].resource)}; + v_groupIndex := f_cse_createResource(int9, m_createGroup(2, v_memberIDs, omit, int2, -, v_acpIds), v_aeIndex_1); // AE child resource - p_requestPrimitive.to_ := f_getResourceAddress(v_groupIndex) & "/fopt"; - p_requestPrimitive.from_ := f_getOriginator(v_groupIndex); - p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); + p_requestPrimitive.to_ := f_getResourceAddress(v_groupIndex) & "/fopt"; + p_requestPrimitive.from_ := f_getOriginator(v_groupIndex); + p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); - // Test Body + // Test Body - f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value vc_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Operation performed successfully by using fanOutPoint in group resource"); + f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Operation performed successfully by using fanOutPoint in group resource"); - if(not ispresent(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list)){ - setverdict(fail, __SCOPE__ & ": Error, aggregatedResponse element not provided"); + if(not ispresent(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list)){ + setverdict(fail, __SCOPE__ & ": Error, aggregatedResponse element not provided"); + } + else{ + if(lengthof(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list) != c_numberOfResponsePrimitive){ + setverdict(fail, __SCOPE__ & ": Error, length of aggregatedResponse is not valid"); } else{ - if(lengthof(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list) != c_numberOfResponsePrimitive){ - setverdict(fail, __SCOPE__ & ": Error, length of aggregatedResponse is not valid"); - } - else{ - for(i:=0; i<c_numberOfResponsePrimitive; i:=i+1){ - if(not match(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list[i].primitiveContent, p_contentResponse)){ - setverdict(fail, __SCOPE__ & ": Error, aggregatedResponse doesn't match with template expected"); - } + for(i:=0; i<c_numberOfResponsePrimitive; i:=i+1){ + if(not match(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list[i].primitiveContent, p_contentResponse)){ + setverdict(fail, __SCOPE__ & ": Error, aggregatedResponse doesn't match with template expected"); } } - } - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while performing the operation"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while performing the operation"); + } } } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while performing the operation"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while performing the operation"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - } // end f_CSE_GMG_005 + } // end f_CSE_GMG_005 - function f_CSE_GMG_006(template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse := omit) runs on AeSimu system CseSystem { - //Local constants - const integer c_numberOfResponsePrimitive := 2; + function f_CSE_GMG_006(template RequestPrimitive p_requestPrimitive, template PrimitiveContent p_contentResponse := omit) runs on AeSimu system CseSystem { + //Local constants + const integer c_numberOfResponsePrimitive := 2; - // Local variables - var integer v_aeIndex_1, v_aeIndex_2, v_acpIndex, v_containerIndex_1, v_ae2LocalIndex, v_groupIndex := -1; - var integer i; - var ListOfURIs v_memberIDs; - var AcpType v_acpIds; - var template RequestPrimitive v_createAcp := m_createAcp("PermissionForEveryone", -, -); - var template RequestPrimitive v_createContainerInAE1 := m_createContainerBase; - var template RequestPrimitive v_createContainerInAE2 := m_createContainerBase; + // Local variables + var integer v_aeIndex_1, v_aeIndex_2, v_acpIndex, v_containerIndex_1, v_ae2LocalIndex, v_groupIndex := -1; + var integer i; + var ListOfURIs v_memberIDs; + var AcpType v_acpIds; + var template RequestPrimitive v_createAcp := m_createAcp("PermissionForEveryone", -, -); + var template RequestPrimitive v_createContainerInAE1 := m_createContainerBase; + var template RequestPrimitive v_createContainerInAE2 := m_createContainerBase; - // Test control - if(not(PICS_ACP_SUPPORT)) { - setverdict(inconc, __SCOPE__ & ": AccessControlPolicy support is required to run this test case"); - stop; - } - - // Test component configuration - f_cf01Up(true); + // Test control + if(not(PICS_ACP_SUPPORT)) { + setverdict(inconc, __SCOPE__ & ": AccessControlPolicy support is required to run this test case"); + stop; + } - // Test adapter configuration + // Test component configuration + f_cf01Up(true); - // Preamble - v_acpIndex := f_cse_createResource(int1, v_createAcp, -); // AE child resource + // Test adapter configuration + + // Preamble + v_acpIndex := f_cse_createResource(int1, v_createAcp, -); // AE child resource - v_acpIds := {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}; + v_acpIds := {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}; - v_aeIndex_1 := f_cse_preamble_registerAe(v_acpIds, -); //c_CRUDNDi + v_aeIndex_1 := f_cse_preamble_registerAe(v_acpIds, -); //c_CRUDNDi - //vc_ae2.start(f_cse_createAccessControlPolicyAux("PermissionForAE1",{"all"}, int63)); - //f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + //vc_ae2.start(f_cse_createAccessControlPolicyAux("PermissionForAE1",{"all"}, int63)); + //f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); - vc_ae2.start(f_cse_createResource(int2, m_createAe(PX_TS_AE2.appId, v_acpIds, PX_TS_AE2.aeIdStem, c_defaultAe2ResourceName, omit), -1)); // AE2 is registred - f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + vc_ae2.start(f_cse_createResource(int2, m_createAe(PX_TS_AE2.appId, v_acpIds, PX_TS_AE2.aeIdStem, c_defaultAe2ResourceName, omit), -1)); // AE2 is registred + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); - v_aeIndex_2 := f_getLatestResourceIndex(vc_ae2); + v_aeIndex_2 := f_getLatestResourceIndex(vc_ae2); - v_ae2LocalIndex := f_getLatestResource(vc_ae2); + v_ae2LocalIndex := f_getLatestResource(vc_ae2); - v_createContainerInAE1 := f_setAcpId(v_createContainerInAE1, v_acpIds); - v_containerIndex_1 := f_cse_createResource(int3, v_createContainerInAE1, v_aeIndex_1); // AE1 child resource - - v_createContainerInAE2 := f_setAcpId(v_createContainerInAE2, v_acpIds); - vc_ae2.start(f_cse_createResource(int3, v_createContainerInAE2, v_aeIndex_2)); - f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); - + v_createContainerInAE1 := f_setAcpId(v_createContainerInAE1, v_acpIds); + v_containerIndex_1 := f_cse_createResource(int3, v_createContainerInAE1, v_aeIndex_1); // AE1 child resource + + v_createContainerInAE2 := f_setAcpId(v_createContainerInAE2, v_acpIds); + vc_ae2.start(f_cse_createResource(int3, v_createContainerInAE2, v_aeIndex_2)); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); - v_memberIDs := {f_getResourceId(vc_resourcesList[v_aeIndex_1].resource), f_getResourceId(vc_resourcesList[v_ae2LocalIndex].resource)}; - //v_membersAcpIds := {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}; - v_groupIndex := f_cse_createResource(int9, m_createGroup(2, v_memberIDs, omit, int2, -, v_acpIds, -), v_aeIndex_1); + v_memberIDs := {f_getResourceId(vc_resourcesList[v_aeIndex_1].resource), f_getResourceId(vc_resourcesList[v_ae2LocalIndex].resource)}; + //v_membersAcpIds := {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}; + v_groupIndex := f_cse_createResource(int9, m_createGroup(2, v_memberIDs, omit, int2, -, v_acpIds, -), v_aeIndex_1); - p_requestPrimitive.to_ := f_getResourceAddress(v_groupIndex) & "/" & c_resourceShortNameFanOutPoint & "/" & c_defaultContainerResourceName; - p_requestPrimitive.from_ := f_getOriginator(v_groupIndex); //TODO see if it is correct or if we have to use PX_SUPER_ADMIN - p_requestPrimitive.requestIdentifier := p_requestPrimitive.requestIdentifier & f_rnd(1, 1000000); + p_requestPrimitive.to_ := f_getResourceAddress(v_groupIndex) & "/" & c_resourceShortNameFanOutPoint & "/" & c_defaultContainerResourceName; + p_requestPrimitive.from_ := f_getOriginator(v_groupIndex); //TODO see if it is correct or if we have to use PX_SUPER_ADMIN + p_requestPrimitive.requestIdentifier := p_requestPrimitive.requestIdentifier & f_rnd(1, 1000000); - // Test Body + // Test Body - f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value vc_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Operation performed successfully by using fanOutPoint in group resource"); + f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Operation performed successfully by using fanOutPoint in group resource"); - if(not ispresent(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list)){ - setverdict(fail, __SCOPE__ & ": Error, aggregatedResponse attribute not provided"); + if(not ispresent(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list)){ + setverdict(fail, __SCOPE__ & ": Error, aggregatedResponse attribute not provided"); + } + else{ + if(lengthof(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list) != c_numberOfResponsePrimitive){ + setverdict(fail, __SCOPE__ & ": Error, length of aggregatedResponse is not valid"); } else{ - if(lengthof(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list) != c_numberOfResponsePrimitive){ - setverdict(fail, __SCOPE__ & ": Error, length of aggregatedResponse is not valid"); - } - else{ - for(i:=0; i<c_numberOfResponsePrimitive; i:=i+1){ - if(not match(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list[i].primitiveContent, p_contentResponse)){ - setverdict(fail, __SCOPE__ & ": Error, aggregatedResponse doesn't match with template expected"); - } + for(i:=0; i<c_numberOfResponsePrimitive; i:=i+1){ + if(not match(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list[i].primitiveContent, p_contentResponse)){ + setverdict(fail, __SCOPE__ & ": Error, aggregatedResponse doesn't match with template expected"); } } - } - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while performing the operation"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while performing the operation"); + } } } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while performing the operation"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while performing the operation"); + } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); - } // end f_CSE_GMG_006 + } // end f_CSE_GMG_006 }// End of Basic_Operations @@ -8656,57 +8655,1366 @@ module OneM2M_PermutationFunctions { function f_CSE_DIS_008(in FilterCriteria p_filterCriteria) runs on AeSimu system CseSystem { - //Local variables - var MsgIn v_response; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var RequestPrimitive v_request; - var integer v_childResourceIndex := -1; - const ResourceType c_containerResourceType := int3; - - // Test control - - // Test component configuration - f_cf01Up(); + //Local variables + var MsgIn v_response; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var RequestPrimitive v_request; + var integer v_childResourceIndex := -1; + const ResourceType c_containerResourceType := int3; + + // Test control + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//AE1 is registred; + + v_resourceIndex := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_aeIndex); + v_childResourceIndex := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_resourceIndex); + v_request := valueof(m_retrieveFilterCriteria(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex), p_filterCriteria)); + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + + [] mcaPort.receive(mw_response(mw_responseDiscovery({}))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Expected no match due to conflicting filter criteria "); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code while retrieving resource"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response while retrieving resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + } // end f_CSE_DIS_008 + + group Basic_Operations { + + function f_CSE_DIS_012(template RequestPrimitive p_requestPrimitive, in ResponseStatusCode p_responseStatusCode) runs on AeSimu system CseSystem { + // Local variables + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var integer v_childResourceIndex_1 := -1; + var integer v_childResourceIndex_2 := -1; + var integer i; + const ResourceType c_containerResourceType := int3; + + // Test control + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//AE1 is registred; + v_resourceIndex := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_aeIndex); + v_childResourceIndex_1 := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_resourceIndex); + v_childResourceIndex_2 := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_resourceIndex); + + p_requestPrimitive.to_ := f_getResourceAddress(v_resourceIndex); + p_requestPrimitive.from_ := f_getOriginator(v_resourceIndex); + p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); + p_requestPrimitive.filterCriteria.filterUsage := int4; + + // Test Body + f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Discovery-based operation performed successfully"); + + if(not ispresent(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list)){ + setverdict(fail, __SCOPE__ & ": Error, aggregatedResponse element not provided"); + } + else { + for(i:=0; i<lengthof(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list); i := i+1){ + if(not match(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list[i], mw_responsePrimitive(p_responseStatusCode))){ + setverdict(fail, __SCOPE__ & ": Error, one responsePrimitve of aggregatedResponse is not successful"); + } + } + } + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while performing the operation"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while performing the operation"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + } // end f_CSE_DIS_012 + + function f_CSE_DIS_013(template RequestPrimitive p_requestPrimitive, in ResponseStatusCode p_responseStatusCode) runs on AeSimu system CseSystem { + // Local variables + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var integer v_childResourceIndex_1 := -1; + var integer v_childResourceIndex_2 := -1; + var Labels v_labels := {"VALUE_1"}; + var template RequestPrimitive v_createRequest := m_createContainerBase; + const ResourceType c_containerResourceType := int3; + + + // Test control + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//AE1 is registred; + v_resourceIndex := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_aeIndex); + v_createRequest.primitiveContent.container.labels := v_labels; + v_childResourceIndex_1 := f_cse_createResource(c_containerResourceType, v_createRequest, v_resourceIndex); + v_childResourceIndex_2 := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_resourceIndex); + + p_requestPrimitive.to_ := f_getResourceAddress(v_resourceIndex); + p_requestPrimitive.from_ := f_getOriginator(v_resourceIndex); + p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); + p_requestPrimitive.filterCriteria.filterUsage := int4; + p_requestPrimitive.filterCriteria.labels := v_labels; + + // Test Body + f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Discovery-based operation performed successfully"); + + if(not ispresent(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list)){ + setverdict(fail, __SCOPE__ & ": Error, aggregatedResponse element not provided"); + } + else { + if(lengthof(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list) != 1){ + setverdict(fail, __SCOPE__ & ": Wrong number of aggregatedResponse elements"); + } + else + { + if(not match(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list[0], mw_responsePrimitive(p_responseStatusCode))){ + setverdict(fail, __SCOPE__ & ": Error, one responsePrimitve of aggregatedResponse is not successful"); + } + } + } + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while performing the operation"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while performing the operation"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + } // end f_CSE_DIS_013 + + function f_CSE_DIS_014(template RequestPrimitive p_requestPrimitive) runs on AeSimu system CseSystem { + // Local variables + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var integer v_childResourceIndex_1 := -1; + var Labels v_labels := {"NotFoundLabel"}; + const ResourceType c_containerResourceType := int3; + + + // Test control + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//AE1 is registred; + v_resourceIndex := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_aeIndex); + v_childResourceIndex_1 := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_resourceIndex); + + p_requestPrimitive.to_ := f_getResourceAddress(v_resourceIndex); + p_requestPrimitive.from_ := f_getOriginator(v_resourceIndex); + p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); + p_requestPrimitive.filterCriteria.filterUsage := int4; + p_requestPrimitive.filterCriteria.labels := v_labels; + + // Test Body + f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Discovery-based operation performed successfully"); + + if(not ispresent(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list)){ + setverdict(fail, __SCOPE__ & ": Error, aggregatedResponse element not provided"); + } + else { + if(lengthof(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list) != 0){ + setverdict(fail, __SCOPE__ & ": Wrong number of aggregatedResponse elements"); + } + } + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while performing the operation"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while performing the operation"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + } // end f_CSE_DIS_014 + + function f_CSE_DIS_015(template RequestPrimitive p_requestPrimitive) runs on AeSimu system CseSystem { + // Local variables + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var integer v_childResourceIndex_1 := -1; + var integer v_i_cont := 0; + const ResourceType c_containerResourceType := int3; + + + // Test control + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//AE1 is registred; + v_resourceIndex := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_aeIndex); + v_childResourceIndex_1 := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_resourceIndex); + + p_requestPrimitive.to_ := f_getResourceAddress(v_resourceIndex); + p_requestPrimitive.from_ := f_getOriginator(v_resourceIndex); + p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); + p_requestPrimitive.filterCriteria.filterUsage := int4; + p_requestPrimitive.desiredIdentifierResultType := int2; + p_requestPrimitive.resultContent := int11;//discovery-result-references + + // Test Body + f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responseDiscovery)) -> value vc_response { + tc_ac.stop; + while (v_i_cont<lengthof(vc_response.primitive.responsePrimitive.primitiveContent.uRIList)){ + if (f_isNonHierarchical(vc_response.primitive.responsePrimitive.primitiveContent.uRIList[v_i_cont])) { + setverdict(pass, __SCOPE__ & ": Non-hierarchical address form present in URIList[" & int2str(v_i_cont) & "] element"); + } else { + setverdict(fail, __SCOPE__ & ": Non-hierarchical address form absent in URIList[" & int2str(v_i_cont) & "] element"); + } + v_i_cont := v_i_cont + 1; + } + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + } // end f_CSE_DIS_015 + + function f_CSE_DIS_016(template RequestPrimitive p_requestPrimitive) runs on AeSimu system CseSystem { + // Local variables + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var integer v_childResourceIndex_1 := -1; + var integer v_childResourceIndex_2 := -1; + var template RequestPrimitive v_createRequest := m_createContainerBase; + const ResourceType c_containerResourceType := int3; + + // Test control + if(not(PICS_ACP_SUPPORT)) { + log(__SCOPE__ & ":INFO: AccessControlPolicy support is required for executing this test case"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_cse_createAccessControlPolicyAux(-, -, int31);//c_CRUDN) + v_aeIndex := f_cse_preamble_registerAe();//AE1 is registred; + v_createRequest := f_setAcpId(v_createRequest, {f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}); + v_resourceIndex := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_aeIndex); + v_childResourceIndex_1 := f_cse_createResource(c_containerResourceType, v_createRequest, v_resourceIndex); + v_childResourceIndex_2 := f_cse_createResource(c_containerResourceType, v_createRequest, v_resourceIndex); + + p_requestPrimitive.to_ := f_getResourceAddress(v_resourceIndex); + p_requestPrimitive.from_ := f_getOriginator(v_resourceIndex); + p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); + p_requestPrimitive.filterCriteria.filterUsage := int4; + + // Test Body + f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Discovery-based operation performed successfully"); + + if(not ispresent(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list)){ + setverdict(fail, __SCOPE__ & ": Error, aggregatedResponse element not provided"); + } + else { + if(lengthof(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list) != 0){ + setverdict(fail, __SCOPE__ & ": Wrong number of aggregatedResponse elements"); + } + } + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while performing the operation"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while performing the operation"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + } // end f_CSE_DIS_016 + + function f_CSE_DIS_017(template RequestPrimitive p_requestPrimitive) runs on AeSimu system CseSystem { + // Local variables + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var integer v_childResourceIndex_1 := -1; + var integer v_childResourceIndex_2 := -1; + var integer i; + var template RequestPrimitive v_createRequest := m_createContainerBase; + const ResourceType c_containerResourceType := int3; + + // Test control + if(not(PICS_ACP_SUPPORT)) { + log(__SCOPE__ & ":INFO: AccessControlPolicy support is required for executing this test case"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_cse_createAccessControlPolicyAux(-, -, int32);//c_Dis) + v_aeIndex := f_cse_preamble_registerAe();//AE1 is registred; + v_createRequest := f_setAcpId(v_createRequest, {f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}); + v_resourceIndex := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_aeIndex); + v_childResourceIndex_1 := f_cse_createResource(c_containerResourceType, v_createRequest, v_resourceIndex); + v_childResourceIndex_2 := f_cse_createResource(c_containerResourceType, v_createRequest, v_resourceIndex); + + p_requestPrimitive.to_ := f_getResourceAddress(v_resourceIndex); + p_requestPrimitive.from_ := f_getOriginator(v_resourceIndex); + p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); + p_requestPrimitive.filterCriteria.filterUsage := int4; + + // Test Body + f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Discovery-based operation performed successfully"); + + if(not ispresent(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list)){ + setverdict(fail, __SCOPE__ & ": Error, aggregatedResponse element not provided"); + } + else { + for(i:=0; i<lengthof(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list); i := i+1){ + if(not match(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list[i], mw_responsePrimitive(int4103))){ + setverdict(fail, __SCOPE__ & ": Error, access not denied to perform operation for one responsePrimitve of aggregatedResponse"); + } + } + } + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while performing the operation"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while performing the operation"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + } // end f_CSE_DIS_017 + + function f_CSE_DIS_018(template RequestPrimitive p_requestPrimitive) runs on AeSimu system CseSystem { + // Local variables + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var XSD.ID v_resourceId := "nonexisting"; + + // Test control + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//AE1 is registred; + + if(PX_ADDRESSING_METHOD == e_nonHierarchical and (PX_PRIMITIVE_SCOPE == e_cseRelative)) { + p_requestPrimitive.to_ := v_resourceId; + p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); + } else { + p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex) & "/" & v_resourceId; + p_requestPrimitive.from_ := f_getOriginator(v_resourceIndex); + } + + p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); + p_requestPrimitive.filterCriteria.filterUsage := int4; + + // Test Body + f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); + tc_ac.start; + alt { + + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4004))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Resource not found"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response while retrieving resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + } // end f_CSE_DIS_018 + + function f_CSE_DIS_019(template RequestPrimitive p_requestPrimitive) runs on AeSimu system CseSystem { + // Local variables + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var integer v_childResourceIndex := -1; + const ResourceType c_containerResourceType := int3; + var AttributeAux v_invalidAttribute; + var FilterCriteria v_invalidFilterCriteria; + + + // Test control + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//AE1 is registred; + + v_resourceIndex := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_aeIndex); + v_childResourceIndex := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_resourceIndex); + v_invalidFilterCriteria := valueof(m_filterCriteria); + v_invalidFilterCriteria.sizeBelow := 1; + + p_requestPrimitive.to_ := f_getResourceAddress(v_resourceIndex); + p_requestPrimitive.from_ := f_getOriginator(v_resourceIndex); + p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); + p_requestPrimitive.filterCriteria := v_invalidFilterCriteria; + p_requestPrimitive.filterCriteria.filterUsage := int4; + v_invalidAttribute := {name := "filterCriteria.sizeBelow", value_ := "-1"}; + + // Test Body + f_send(e_mcaPort, m_request(valueof(p_requestPrimitive), {v_invalidAttribute})); + tc_ac.start; + alt { + + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Discovery-based operation properly rejected due to invalid filter criteria format"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code while retrieving resource"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response while retrieving resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + } // end f_CSE_DIS_019 + + function f_CSE_DIS_020(template RequestPrimitive p_requestPrimitive, in FilterCriteria p_filterCriteria) runs on AeSimu system CseSystem { + // Local variables + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var integer v_childResourceIndex_1 := -1; + const ResourceType c_containerResourceType := int3; + + + // Test control + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//AE1 is registred; + v_resourceIndex := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_aeIndex); + v_childResourceIndex_1 := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_resourceIndex); + + p_requestPrimitive.to_ := f_getResourceAddress(v_resourceIndex); + p_requestPrimitive.from_ := f_getOriginator(v_resourceIndex); + p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); + p_requestPrimitive.filterCriteria := p_filterCriteria; + p_requestPrimitive.filterCriteria.filterUsage := int4; + + // Test Body + f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Discovery-based operation performed successfully"); + + if(not ispresent(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list)){ + setverdict(fail, __SCOPE__ & ": Error, aggregatedResponse element not provided"); + } + else { + if(lengthof(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list) != 0){ + setverdict(fail, __SCOPE__ & ": Wrong number of aggregatedResponse elements"); + } + } + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while performing the operation"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while performing the operation"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + } // end f_CSE_DIS_020 + + function f_CSE_DIS_021(template RequestPrimitive p_requestPrimitive) runs on AeSimu system CseSystem { + // Local variables + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var integer v_childResourceIndex := -1; + const ResourceType c_containerResourceType := int3; + var Labels v_labels := {"VALUE_1"}; + var template RequestPrimitive v_createRequest := m_createContainerBase; + + // Test control + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_cse_createAccessControlPolicyAux(-, -);//c_CRUDNDi) + v_aeIndex := f_cse_preamble_registerAe();//AE1 is registred; + + f_cse_updateAcpAuxResource(int31); //c_CRUDN) + + v_createRequest.primitiveContent.container.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}; + v_createRequest.primitiveContent.container.labels := v_labels; + v_resourceIndex := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_aeIndex); + v_childResourceIndex := f_cse_createResource(c_containerResourceType, v_createRequest, v_resourceIndex); + + p_requestPrimitive.to_ := f_getResourceAddress(v_resourceIndex); + p_requestPrimitive.from_ := f_getOriginator(v_resourceIndex); + p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); + p_requestPrimitive.filterCriteria.filterUsage := int4; + p_requestPrimitive.filterCriteria.labels := v_labels; + + // Test Body + f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Discovery-based operation performed successfully"); + + if(not ispresent(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list)){ + setverdict(fail, __SCOPE__ & ": Error, aggregatedResponse element not provided"); + } + else { + if(lengthof(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list) != 0){ + setverdict(fail, __SCOPE__ & ": Wrong number of aggregatedResponse elements"); + } + } + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while performing the operation"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while performing the operation"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + } // end f_CSE_DIS_021 + + function f_CSE_DIS_022(template RequestPrimitive p_requestPrimitive) runs on AeSimu system CseSystem { + // Local variables + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var integer v_childResourceIndex := -1; + const ResourceType c_containerResourceType := int3; + var Labels v_labels := {"VALUE_1"}; + var integer v_i_cont := 0; + + // Test control + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//AE1 is registred; + + v_resourceIndex := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_aeIndex); + v_childResourceIndex := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_resourceIndex); + + p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); + p_requestPrimitive.from_ := f_getOriginator(v_resourceIndex); + p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); + p_requestPrimitive.filterCriteria.filterUsage := int4; + p_requestPrimitive.desiredIdentifierResultType := int1; + p_requestPrimitive.resultContent := int11;//discovery-result-references + + // Test Body + f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value vc_response { + tc_ac.stop; + while (v_i_cont<lengthof(vc_response.primitive.responsePrimitive.primitiveContent.uRIList)){ + if (f_isHierarchical(vc_response.primitive.responsePrimitive.primitiveContent.uRIList[v_i_cont])) { + setverdict(pass, __SCOPE__ & ": Hierarchical address form present in URIList[" & int2str(v_i_cont) & "] element"); + } else { + setverdict(fail, __SCOPE__ & ": Hierarchical address form absent in URIList[" & int2str(v_i_cont) & "] element"); + } + v_i_cont := v_i_cont + 1; + } + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while performing the operation"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while performing the operation"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + } // end f_CSE_DIS_022 + + function f_CSE_DIS_023(template RequestPrimitive p_requestPrimitive) runs on AeSimu system CseSystem { + // Local variables + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var integer v_childResourceIndex := -1; + const ResourceType c_containerResourceType := int3; + var Labels v_labels := {"VALUE_1"}; + var integer v_i_cont := 0; + + // Test control + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//AE1 is registred; + + v_resourceIndex := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_aeIndex); + v_childResourceIndex := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_resourceIndex); + + p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); + p_requestPrimitive.from_ := f_getOriginator(v_resourceIndex); + p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); + p_requestPrimitive.filterCriteria.filterUsage := int4; + p_requestPrimitive.resultContent := int11;//discovery-result-references + + // Test Body + f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value vc_response { + tc_ac.stop; + while (v_i_cont<lengthof(vc_response.primitive.responsePrimitive.primitiveContent.uRIList)){ + if (f_isHierarchical(vc_response.primitive.responsePrimitive.primitiveContent.uRIList[v_i_cont])) { + setverdict(pass, __SCOPE__ & ": Hierarchical address form present in URIList[" & int2str(v_i_cont) & "] element"); + } else { + setverdict(fail, __SCOPE__ & ": Hierarchical address form absent in URIList[" & int2str(v_i_cont) & "] element"); + } + v_i_cont := v_i_cont + 1; + } + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while performing the operation"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while performing the operation"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + } // end f_CSE_DIS_023 + + function f_CSE_DIS_024(template RequestPrimitive p_requestPrimitive) runs on AeSimu system CseSystem { + // Local variables + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var integer v_childResourceIndex := -1; + var integer i; + const ResourceType c_containerResourceType := int3; + var Labels v_labels := {"VALUE_1"}; + var template RequestPrimitive v_createRequest := m_createContainerBase; + + // Test control + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//AE1 is registred; + + v_resourceIndex := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_aeIndex); + v_createRequest.primitiveContent.container.labels := v_labels; + v_childResourceIndex := f_cse_createResource(c_containerResourceType, v_createRequest, v_resourceIndex); + + p_requestPrimitive.to_ := f_getResourceAddress(v_resourceIndex); + p_requestPrimitive.from_ := f_getOriginator(v_resourceIndex); + p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); + p_requestPrimitive.filterCriteria.filterUsage := int4; + p_requestPrimitive.filterCriteria.labels := v_labels; + + // Test Body + f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Discovery-based operation performed successfully"); + + if(not ispresent(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list)){ + setverdict(fail, __SCOPE__ & ": Error, aggregatedResponse element not provided"); + } + else { + for(i:=0; i<lengthof(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list); i := i+1){ + if(not match(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list[i], mw_responsePrimitive(int4000))){ + setverdict(fail, __SCOPE__ & ": Error, operation is not rejected with reason BAD_REQUEST for one responsePrimitve of aggregatedResponse"); + } + } + } + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while performing the operation"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while performing the operation"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + } // end f_CSE_DIS_024 + + function f_CSE_DIS_025(template RequestPrimitive p_requestPrimitive, in ResponseStatusCode p_responseStatusCode) runs on AeSimu system CseSystem { + // Local variables + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var integer v_childResourceIndex_1 := -1; + var integer v_childResourceIndex_2 := -1; + var Labels v_labels := {"VALUE_1"}; + var ListOfCoordinates v_location_1 := {2.3514616, 48.8566969}; + var ListOfCoordinates v_location_2 := {-4.4216366, 36.7213028}; + var template RequestPrimitive v_createRequest := m_createContainerBase; + const ResourceType c_containerResourceType := int3; + + // Test control + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//AE1 is registred; + v_resourceIndex := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_aeIndex); + v_createRequest.primitiveContent.container.location.coordinates := v_location_1; + v_createRequest.primitiveContent.container.location.type_ := int1; + v_childResourceIndex_1 := f_cse_createResource(c_containerResourceType, v_createRequest, v_resourceIndex); + v_createRequest.primitiveContent.container.location.coordinates := v_location_2; + v_createRequest.primitiveContent.container.location.type_ := int1; + v_createRequest.primitiveContent.container.labels := v_labels; + v_childResourceIndex_2 := f_cse_createResource(c_containerResourceType, v_createRequest, v_resourceIndex); + + p_requestPrimitive.to_ := f_getResourceAddress(v_resourceIndex); + p_requestPrimitive.from_ := f_getOriginator(v_resourceIndex); + p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); + p_requestPrimitive.filterCriteria.filterUsage := int4; + p_requestPrimitive.filterCriteria.geoQuery.geometryType := int1; + p_requestPrimitive.filterCriteria.geoQuery.geometry := v_location_2; + p_requestPrimitive.filterCriteria.geoQuery.geoSpatialFunction := int2; + + // Test Body + f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Discovery-based operation performed successfully"); + + if(not ispresent(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list)){ + setverdict(fail, __SCOPE__ & ": Error, aggregatedResponse element not provided"); + } + else { + if(lengthof(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list) != 1){ + setverdict(fail, __SCOPE__ & ": Wrong number of aggregatedResponse elements"); + } + else + { + if(not match(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list[0], mw_responsePrimitive(p_responseStatusCode))){ + setverdict(fail, __SCOPE__ & ": Error, one responsePrimitve of aggregatedResponse is not successful"); + } + } + } + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while performing the operation"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while performing the operation"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + } // end f_CSE_DIS_025 + + function f_CSE_DIS_026(template RequestPrimitive p_requestPrimitive) runs on AeSimu system CseSystem { + // Local variables + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var integer v_childResourceIndex_1 := -1; + var ListOfCoordinates v_location_1 := {2.3514616, 48.8566969}; + var ListOfCoordinates v_location_2 := {-4.4216366, 36.7213028}; + var template RequestPrimitive v_createRequest := m_createContainerBase; + const ResourceType c_containerResourceType := int3; + + + // Test control + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//AE1 is registred; + v_resourceIndex := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_aeIndex); + v_createRequest.primitiveContent.container.location.coordinates := v_location_1; + v_createRequest.primitiveContent.container.location.type_ := int1; + v_childResourceIndex_1 := f_cse_createResource(c_containerResourceType, v_createRequest, v_resourceIndex); + + p_requestPrimitive.to_ := f_getResourceAddress(v_resourceIndex); + p_requestPrimitive.from_ := f_getOriginator(v_resourceIndex); + p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); + p_requestPrimitive.filterCriteria.filterUsage := int4; + p_requestPrimitive.filterCriteria.geoQuery.geometryType := int1; + p_requestPrimitive.filterCriteria.geoQuery.geometry := v_location_2; + p_requestPrimitive.filterCriteria.geoQuery.geoSpatialFunction := int2; + + // Test Body + f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Discovery-based operation performed successfully"); + + if(not ispresent(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list)){ + setverdict(fail, __SCOPE__ & ": Error, aggregatedResponse element not provided"); + } + else { + if(lengthof(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list) != 0){ + setverdict(fail, __SCOPE__ & ": Wrong number of aggregatedResponse elements"); + } + } + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while performing the operation"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while performing the operation"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + } // end f_CSE_DIS_026 + + function f_CSE_DIS_027(template RequestPrimitive p_requestPrimitive) runs on AeSimu system CseSystem { + // Local variables + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var integer v_childResourceIndex := -1; + var ListOfCoordinates v_location_1 := {2.3514616, 48.8566969}; + var template RequestPrimitive v_createRequest := m_createContainerBase; + const ResourceType c_containerResourceType := int3; + var AttributeAux v_invalidAttribute; + var FilterCriteria v_invalidFilterCriteria; + + + // Test control + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//AE1 is registred; + + v_resourceIndex := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_aeIndex); + v_createRequest.primitiveContent.container.location.coordinates := v_location_1; + v_createRequest.primitiveContent.container.location.type_ := int1; + v_childResourceIndex := f_cse_createResource(c_containerResourceType, v_createRequest, v_resourceIndex); + v_invalidFilterCriteria := valueof(m_filterCriteria); + v_invalidFilterCriteria.geoQuery.geometryType := int1; //it will be overwritten by forceFields parameter + v_invalidFilterCriteria.geoQuery.geometry := v_location_1; + v_invalidFilterCriteria.geoQuery.geoSpatialFunction := int2; + + p_requestPrimitive.to_ := f_getResourceAddress(v_resourceIndex); + p_requestPrimitive.from_ := f_getOriginator(v_resourceIndex); + p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); + p_requestPrimitive.filterCriteria := v_invalidFilterCriteria; + p_requestPrimitive.filterCriteria.filterUsage := int4; + v_invalidAttribute := {name := "filterCriteria.geoQuery.geometryType", value_ := "7"}; + + // Test Body + f_send(e_mcaPort, m_request(valueof(p_requestPrimitive), {v_invalidAttribute})); + tc_ac.start; + alt { + + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Discovery-based operation properly rejected due to invalid filter criteria format"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code while retrieving resource"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response while retrieving resource"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + } // end f_CSE_DIS_027 + + function f_CSE_DIS_028(template RequestPrimitive p_requestPrimitive) runs on AeSimu system CseSystem { + // Local variables + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var integer v_childResourceIndex_1 := -1; + var ListOfCoordinates v_location_1 := {2.3514616, 48.8566969}; + const ResourceType c_containerResourceType := int3; + + + // Test control + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_aeIndex := f_cse_preamble_registerAe();//AE1 is registred; + v_resourceIndex := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_aeIndex); + v_childResourceIndex_1 := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_resourceIndex); + + p_requestPrimitive.to_ := f_getResourceAddress(v_resourceIndex); + p_requestPrimitive.from_ := f_getOriginator(v_resourceIndex); + p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); + p_requestPrimitive.filterCriteria.filterUsage := int4; + p_requestPrimitive.filterCriteria.geoQuery.geometryType := int1; + p_requestPrimitive.filterCriteria.geoQuery.geometry := v_location_1; + p_requestPrimitive.filterCriteria.geoQuery.geoSpatialFunction := int2; + + // Test Body + f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Discovery-based operation performed successfully"); + + if(not ispresent(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list)){ + setverdict(fail, __SCOPE__ & ": Error, aggregatedResponse element not provided"); + } + else { + if(lengthof(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list) != 0){ + setverdict(fail, __SCOPE__ & ": Wrong number of aggregatedResponse elements"); + } + } + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while performing the operation"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while performing the operation"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + } // end f_CSE_DIS_028 + + function f_CSE_DIS_029(template RequestPrimitive p_requestPrimitive, in ResponseStatusCode p_responseStatusCode) runs on AeSimu system CseSystem { + // Local variables + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var integer v_childResourceIndex_1 := -1; + var integer v_childResourceIndex_2 := -1; + var integer i; + const ResourceType c_containerResourceType := int3; + + // Test control + if(not(PICS_ACP_SUPPORT)) { + log(__SCOPE__ & ":INFO: AccessControlPolicy support is required for executing this test case"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_cse_createAccessControlPolicyAux(-, -);//c_CRUDNDi) + f_cse_createAccessControlPolicyAux(-, {f_getResourceId(vc_resourcesList[v_aeIndex].resource)},int31);//c_CRDND); + + v_aeIndex := f_cse_preamble_registerAe();//AE1 is registred; + v_resourceIndex := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_aeIndex); + v_childResourceIndex_1 := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_resourceIndex); + v_childResourceIndex_2 := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_resourceIndex); + + p_requestPrimitive.to_ := f_getResourceAddress(v_resourceIndex); + p_requestPrimitive.from_ := f_getOriginator(v_resourceIndex); + p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); + p_requestPrimitive.filterCriteria.filterUsage := int4; + + // Test Body + f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Discovery-based operation performed successfully"); + + if(not ispresent(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list)){ + setverdict(fail, __SCOPE__ & ": Error, aggregatedResponse element not provided"); + } + else { + for(i:=0; i<lengthof(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list); i := i+1){ + if(not match(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list[i], mw_responsePrimitive(p_responseStatusCode))){ + setverdict(fail, __SCOPE__ & ": Error, one responsePrimitve of aggregatedResponse is not successful"); + } + } + } + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while performing the operation"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while performing the operation"); + } + } + + // Postamble + f_cse_postamble_deleteResources(); - // Test adapter configuration + // Tear down + f_cf01Down(); - // Preamble - v_aeIndex := f_cse_preamble_registerAe();//AE1 is registred; + } // end f_CSE_DIS_029 + + function f_CSE_DIS_030(template RequestPrimitive p_requestPrimitive) runs on AeSimu system CseSystem { + // Local variables + var integer v_aeIndex_1 := -1; + var integer v_aeIndex_2 := -1; + var integer v_resourceIndex := -1; + var integer v_childResourceIndex := -1; + var template RequestPrimitive v_updateRequest := m_updateAeBase; + var template RequestPrimitive v_createRequest := m_createContainerBase; + const ResourceType c_containerResourceType := int3; + const ResourceType c_AEResourceType := int2; + + // Test control + + // Test component configuration + f_cf01Up(true); - v_resourceIndex := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_aeIndex); - v_childResourceIndex := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_resourceIndex); - v_request := valueof(m_retrieveFilterCriteria(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex), p_filterCriteria)); - f_send(e_mcaPort, m_request(v_request)); - tc_ac.start; - alt { + // Test adapter configuration - [] mcaPort.receive(mw_response(mw_responseDiscovery({}))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Expected no match due to conflicting filter criteria "); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code while retrieving resource"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response while retrieving resource"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); + // Preamble + v_aeIndex_1 := f_cse_preamble_registerAe();//AE1 is registred; + vc_ae2.start(f_cse_createResource(c_AEResourceType, m_createAe(PX_TS_AE2.appId, -, PX_TS_AE2.aeIdStem, c_defaultAe2ResourceName, omit), -1)); // AE2 is registred + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + v_aeIndex_2 := f_getResourceFromAeSimu(vc_ae2); + + vc_ae2.start(f_cse_createResource(c_containerResourceType, v_createRequest, v_aeIndex_2)); //Container resource + v_resourceIndex := f_getLatestResourceIndex(vc_ae2); + vc_ae2.start(f_cse_createResource(c_containerResourceType, m_createContainerBase, v_resourceIndex)); //Container resource child + + v_updateRequest.primitiveContent.aE.registrationStatus := int2;//INACTIVE + vc_ae2.start(f_cse_updateResource(c_AEResourceType, v_aeIndex_2, v_updateRequest)); + + p_requestPrimitive.to_ := f_getResourceAddress(v_resourceIndex); + p_requestPrimitive.from_ := f_getOriginator(v_aeIndex_1); + p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); + p_requestPrimitive.filterCriteria.filterUsage := int4; + + // Test Body + f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Discovery-based operation performed successfully"); + + if(not ispresent(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list)){ + setverdict(fail, __SCOPE__ & ": Error, aggregatedResponse element not provided"); + } + else { + if(lengthof(vc_response.primitive.responsePrimitive.primitiveContent.aggregatedResponse.responsePrimitive_list) != 0){ + setverdict(fail, __SCOPE__ & ": Wrong number of aggregatedResponse elements"); + } + } + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while performing the operation"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while performing the operation"); + } } - } - - // Postamble - f_cse_postamble_deleteResources(); - - // Tear down - f_cf01Down(); - } // end f_CSE_DIS_008 + // Postamble + f_cse_postamble_deleteResources(); + + // Tear down + f_cf01Down(); + + } // end f_CSE_DIS_030 + + } // end of Basic_Operations - } //end group Group Discovery + } // end Group Discovery group Subscription_And_Notification { @@ -8730,13 +10038,13 @@ module OneM2M_PermutationFunctions { // Test adapter configuration // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - f_cse_preamble_subscriptionVerification(v_ae2Index, v_createSubscriptionRequest, int23); + f_cse_preamble_subscriptionVerification(v_ae2Index, v_createSubscriptionRequest, int23); - v_parentResourceIndex := f_cse_createResource(p_parentResourceType, p_parentResourceRequestPrimitive, v_aeIndex);//Parent + v_parentResourceIndex := f_cse_createResource(p_parentResourceType, p_parentResourceRequestPrimitive, v_aeIndex);//Parent - if(p_parentResourceType != int23){ + if(p_parentResourceType != int23){ v_childResourceIndex := f_cse_createResource(p_childResourceType, p_childRequestPrimitive, v_parentResourceIndex);//Child }else{ v_childResourceIndex := v_parentResourceIndex; @@ -8785,7 +10093,7 @@ module OneM2M_PermutationFunctions { // Local variables var integer v_aeIndex := -1; var template RequestPrimitive v_createRequest := m_createSubscriptionBase; - var RequestPrimitive v_request; + var RequestPrimitive v_request; // Test control @@ -8795,10 +10103,10 @@ module OneM2M_PermutationFunctions { // Test adapter configuration // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); v_createRequest.primitiveContent.subscription.eventNotificationCriteria := m_eventNotificationCriteria({int6, p_notificationEventType}); - v_request := f_getCreateRequestPrimitive(int23, v_createRequest, v_aeIndex);//Subscription + v_request := f_getCreateRequestPrimitive(int23, v_createRequest, v_aeIndex);//Subscription // Test Body f_send(e_mcaPort, m_request(v_request)); @@ -8825,9 +10133,9 @@ module OneM2M_PermutationFunctions { //Check to see if the resource is NOT present if(f_cse_isResourceNotPresent(v_aeIndex, f_getResourceName(v_request.primitiveContent))){ - setverdict(pass, __SCOPE__ & ":INFO: Resource not created"); + setverdict(pass, __SCOPE__ & ":INFO: Resource not created"); } else { - setverdict(fail, __SCOPE__ & ":ERROR: Resource created"); + setverdict(fail, __SCOPE__ & ":ERROR: Resource created"); } //Postamble @@ -8852,10 +10160,10 @@ module OneM2M_PermutationFunctions { // Test adapter configuration // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); v_createRequest.primitiveContent.subscription.eventNotificationCriteria := m_eventNotificationCriteria({int7, p_notificationEventType}); - v_request := f_getCreateRequestPrimitive(int23, v_createRequest, v_aeIndex);//Subscription + v_request := f_getCreateRequestPrimitive(int23, v_createRequest, v_aeIndex);//Subscription // Test Body f_send(e_mcaPort, m_request(v_request)); @@ -8882,9 +10190,9 @@ module OneM2M_PermutationFunctions { //Check to see if the resource is NOT present if(f_cse_isResourceNotPresent(v_aeIndex, f_getResourceName(v_request.primitiveContent))){ - setverdict(pass, __SCOPE__ & ":INFO: Resource not created"); + setverdict(pass, __SCOPE__ & ":INFO: Resource not created"); } else { - setverdict(fail, __SCOPE__ & ":ERROR: Resource created"); + setverdict(fail, __SCOPE__ & ":ERROR: Resource created"); } //Postamble @@ -8909,11 +10217,11 @@ module OneM2M_PermutationFunctions { // Test adapter configuration // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); v_createRequest.primitiveContent.subscription.eventNotificationCriteria := m_eventNotificationCriteria({int6}); v_createRequest.primitiveContent.subscription.notificationContentType := p_notificationContentType; - v_request := f_getCreateRequestPrimitive(int23, v_createRequest, v_aeIndex);//Subscription + v_request := f_getCreateRequestPrimitive(int23, v_createRequest, v_aeIndex);//Subscription // Test Body f_send(e_mcaPort, m_request(v_request)); @@ -8940,9 +10248,9 @@ module OneM2M_PermutationFunctions { //Check to see if the resource is NOT present if(f_cse_isResourceNotPresent(v_aeIndex, f_getResourceName(v_request.primitiveContent))){ - setverdict(pass, __SCOPE__ & ":INFO: Resource not created"); + setverdict(pass, __SCOPE__ & ":INFO: Resource not created"); } else { - setverdict(fail, __SCOPE__ & ":ERROR: Resource created"); + setverdict(fail, __SCOPE__ & ":ERROR: Resource created"); } //Postamble @@ -8967,11 +10275,11 @@ module OneM2M_PermutationFunctions { // Test adapter configuration // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); v_createRequest.primitiveContent.subscription.eventNotificationCriteria := m_eventNotificationCriteria({int7}); v_createRequest.primitiveContent.subscription.notificationContentType := p_notificationContentType; - v_request := f_getCreateRequestPrimitive(int23, v_createRequest, v_aeIndex);//Subscription + v_request := f_getCreateRequestPrimitive(int23, v_createRequest, v_aeIndex);//Subscription // Test Body f_send(e_mcaPort, m_request(v_request)); @@ -8998,9 +10306,9 @@ module OneM2M_PermutationFunctions { //Check to see if the resource is NOT present if(f_cse_isResourceNotPresent(v_aeIndex, f_getResourceName(v_request.primitiveContent))){ - setverdict(pass, __SCOPE__ & ":INFO: Resource not created"); + setverdict(pass, __SCOPE__ & ":INFO: Resource not created"); } else { - setverdict(fail, __SCOPE__ & ":ERROR: Resource created"); + setverdict(fail, __SCOPE__ & ":ERROR: Resource created"); } //Postamble @@ -9025,11 +10333,11 @@ module OneM2M_PermutationFunctions { // Test adapter configuration // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); v_createRequest.primitiveContent.subscription.eventNotificationCriteria := m_eventNotificationCriteria({p_notificationEventType}); v_createRequest.primitiveContent.subscription.notificationContentType := int4; - v_request := f_getCreateRequestPrimitive(int23, v_createRequest, v_aeIndex);//Subscription + v_request := f_getCreateRequestPrimitive(int23, v_createRequest, v_aeIndex);//Subscription // Test Body f_send(e_mcaPort, m_request(v_request)); @@ -9056,9 +10364,9 @@ module OneM2M_PermutationFunctions { //Check to see if the resource is NOT present if(f_cse_isResourceNotPresent(v_aeIndex, f_getResourceName(v_request.primitiveContent))){ - setverdict(pass, __SCOPE__ & ":INFO: Resource not created"); + setverdict(pass, __SCOPE__ & ":INFO: Resource not created"); } else { - setverdict(fail, __SCOPE__ & ":ERROR: Resource created"); + setverdict(fail, __SCOPE__ & ":ERROR: Resource created"); } //Postamble @@ -9083,11 +10391,11 @@ module OneM2M_PermutationFunctions { // Test adapter configuration // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); v_createRequest.primitiveContent.subscription.eventNotificationCriteria := m_eventNotificationCriteria({p_notificationEventType}); v_createRequest.primitiveContent.subscription.notificationContentType := int2; - v_request := f_getCreateRequestPrimitive(int23, v_createRequest, v_aeIndex);//Subscription + v_request := f_getCreateRequestPrimitive(int23, v_createRequest, v_aeIndex);//Subscription // Test Body f_send(e_mcaPort, m_request(v_request)); @@ -9114,9 +10422,9 @@ module OneM2M_PermutationFunctions { //Check to see if the resource is NOT present if(f_cse_isResourceNotPresent(v_aeIndex, f_getResourceName(v_request.primitiveContent))){ - setverdict(pass, __SCOPE__ & ":INFO: Resource not created"); + setverdict(pass, __SCOPE__ & ":INFO: Resource not created"); } else { - setverdict(fail, __SCOPE__ & ":ERROR: Resource created"); + setverdict(fail, __SCOPE__ & ":ERROR: Resource created"); } //Postamble @@ -9131,6 +10439,359 @@ module OneM2M_PermutationFunctions { group Notify{ + function f_CSE_SUB_NTF_012(in TimeWindowType p_timeWindowType) runs on AeSimu system CseSystem { + + // Local variables + var integer v_aeIndex_1 := -1; + var integer v_aeIndex_2 := -1; + var integer v_resourceIndex := -1; + var integer v_resourceIndex_1 := -1; + var integer v_resourceIndex_2 := -1; + var template RequestPrimitive v_createRequest := m_createContainerBase; + const ResourceType c_containerResourceType := int3; + var template RequestPrimitive v_updateRequest_1 := m_updateContainerBase; + var template RequestPrimitive v_updateRequest_2 := m_updateContainerBase; + var Labels v_labels_1:= {"VALUE_1"}; + var Labels v_labels_2:= {"VALUE_2"}; + var RequestPrimitive v_notificationRequest; + var AbsRelTimestamp myAbsRelTimestamp; + myAbsRelTimestamp.alt_1 := float2int(PX_TAC/2.0); + + // Test control + + // Test component configuration + f_cf01Up(true); + + // Test adapter configuration + + // Preamble + v_aeIndex_1 := f_cse_preamble_registerAe();//c_CRUDNDi); + v_resourceIndex_1 := f_cse_createResource(c_containerResourceType, v_createRequest, v_aeIndex_1);//Container_1 + v_resourceIndex_2 := f_cse_createResource(c_containerResourceType, v_createRequest, v_aeIndex_1);//Container_2 + + v_createRequest := m_createCrossResourceSubscription("NotInitialized", -, {f_getResourceAddress(v_aeIndex_2)}, p_timeWindowType, myAbsRelTimestamp, "NullValue"); + v_createRequest.primitiveContent.crossResourceSubscription.regularResourcesAsTarget := {f_getResourceAddress(v_resourceIndex_1), f_getResourceAddress(v_resourceIndex_2)}; + v_createRequest.primitiveContent.crossResourceSubscription.eventNotificationCriteriaSet.eventNotificationCriteriaEntry_list := {m_eventNotificationCriteria({int1})}; // Update_of_Resource + f_cse_preamble_subscriptionVerification(v_aeIndex_2, v_createRequest, int48);//AE2 registration + + v_resourceIndex := f_cse_createResource(int48, v_createRequest, v_aeIndex_1);//CrossResourceSubscription + + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + + if(vc_ae2.running) { + vc_ae2.stop; + }; + + // Test Body + vc_ae2.start(f_cse_notifyProcedure_defaultHandler()); + + v_updateRequest_1.filterCriteria.labels := v_labels_1; + f_cse_updateResource(int3, v_resourceIndex_1, v_updateRequest_1); // Update request 1 + v_updateRequest_2.filterCriteria.labels := v_labels_2; + f_cse_updateResource(int3, v_resourceIndex_2, v_updateRequest_2); // Update request 2 + + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + + v_notificationRequest := f_getRequestPrimitive(vc_ae2); + + if(f_compareURIs(v_resourceIndex, v_notificationRequest.primitiveContent.notification.subscriptionReference)) { + setverdict(pass, __SCOPE__ & ": Cross-Resource Notification received from crossResourceSubscription"); + } else { + setverdict(fail, __SCOPE__ & ": Cross-Resource Notification not received from crossResourceSubscription"); + } + + //Postamble + f_cse_postamble_deleteResources(); + + //Tear down + f_cf01Down(); + + } // end f_CSE_SUB_NTF_012 + + function f_CSE_SUB_NTF_013(in TimeWindowType p_timeWindowType) runs on AeSimu system CseSystem { + + // Local variables + var integer v_aeIndex_1 := -1; + var integer v_aeIndex_2 := -1; + var integer v_resourceIndex := -1; + var integer v_resourceIndex_1 := -1; + var integer v_resourceIndex_2 := -1; + var template RequestPrimitive v_createRequest := m_createContainerBase; + const ResourceType c_containerResourceType := int3; + var template RequestPrimitive v_updateRequest_1 := m_updateContainerBase; + var template RequestPrimitive v_updateRequest_2 := m_updateContainerBase; + var Labels v_labels_1:= {"VALUE_1"}; + var Labels v_labels_2:= {"VALUE_2"}; + var RequestPrimitive v_notificationRequest; + var AbsRelTimestamp myAbsRelTimestamp; + myAbsRelTimestamp.alt_1 := float2int(PX_TAC / 2.0); + timer t_notificationTimer := PX_TAC; + var float v_elapsedTime; + + // Test control + + // Test component configuration + f_cf01Up(true); + + // Test adapter configuration + + // Preamble + v_aeIndex_1 := f_cse_preamble_registerAe();//c_CRUDNDi); + v_resourceIndex_1 := f_cse_createResource(c_containerResourceType, v_createRequest, v_aeIndex_1);//Container_1 + v_resourceIndex_2 := f_cse_createResource(c_containerResourceType, v_createRequest, v_aeIndex_1);//Container_2 + + v_createRequest := m_createCrossResourceSubscription("NotInitialized", -, {f_getResourceAddress(v_aeIndex_2)}, p_timeWindowType, myAbsRelTimestamp, "NullValue"); + v_createRequest.primitiveContent.crossResourceSubscription.regularResourcesAsTarget := {f_getResourceAddress(v_resourceIndex_1), f_getResourceAddress(v_resourceIndex_2)}; + v_createRequest.primitiveContent.crossResourceSubscription.eventNotificationCriteriaSet.eventNotificationCriteriaEntry_list := {m_eventNotificationCriteria({int1})}; // Update_of_Resource + f_cse_preamble_subscriptionVerification(v_aeIndex_2, v_createRequest, int48);//AE2 registration + + v_resourceIndex := f_cse_createResource(int48, v_createRequest, v_aeIndex_1);//CrossResourceSubscription + + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + + if(vc_ae2.running) { + vc_ae2.stop; + }; + + // Test Body + vc_ae2.start(f_cse_notifyProcedure_noNotificationHandler()); + t_notificationTimer.start; + + v_updateRequest_1.filterCriteria.labels := v_labels_1; + f_cse_updateResource(int3, v_resourceIndex_1, v_updateRequest_1); // Update request 1 + + v_elapsedTime := t_notificationTimer.read; + while (v_elapsedTime < int2float(myAbsRelTimestamp.alt_1)){ // Wait until window size expires + v_elapsedTime := t_notificationTimer.read; + } + t_notificationTimer.stop; + + v_updateRequest_2.filterCriteria.labels := v_labels_2; + f_cse_updateResource(int3, v_resourceIndex_2, v_updateRequest_2); // Update request 2 + + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + + //Postamble + f_cse_postamble_deleteResources(); + + //Tear down + f_cf01Down(); + + } // end f_CSE_SUB_NTF_013 + + function f_CSE_SUB_NTF_014(in TimeWindowType p_timeWindowType) runs on AeSimu system CseSystem { + + // Local variables + var integer v_aeIndex_1 := -1; + var integer v_aeIndex_2 := -1; + var integer v_resourceIndex := -1; + var integer v_resourceIndex_1 := -1; + var integer v_resourceIndex_2 := -1; + var template RequestPrimitive v_createRequest := m_createContainerBase; + const ResourceType c_containerResourceType := int3; + var template RequestPrimitive v_updateRequest_1 := m_updateContainerBase; + var template RequestPrimitive v_updateRequest_2 := m_updateContainerBase; + var Labels v_labels_1:= {"VALUE_1"}; + var Labels v_labels_2:= {"VALUE_2"}; + var RequestPrimitive v_notificationRequest; + var AbsRelTimestamp myAbsRelTimestamp; + myAbsRelTimestamp.alt_1 := float2int(PX_TAC / 2.0); + + // Test control + + // Test component configuration + f_cf01Up(true); + + // Test adapter configuration + + // Preamble + v_aeIndex_1 := f_cse_preamble_registerAe();//c_CRUDNDi); + v_resourceIndex_1 := f_cse_createResource(c_containerResourceType, v_createRequest, v_aeIndex_1);//Container_1 + v_resourceIndex_2 := f_cse_createResource(c_containerResourceType, v_createRequest, v_aeIndex_1);//Container_2 + + v_createRequest := m_createCrossResourceSubscription("NotInitialized", -, {f_getResourceAddress(v_aeIndex_2)}, p_timeWindowType, myAbsRelTimestamp, "NullValue"); + v_createRequest.primitiveContent.crossResourceSubscription.regularResourcesAsTarget := {f_getResourceAddress(v_resourceIndex_1), f_getResourceAddress(v_resourceIndex_2)}; + v_createRequest.primitiveContent.crossResourceSubscription.eventNotificationCriteriaSet.eventNotificationCriteriaEntry_list := {m_eventNotificationCriteria({int2})}; // Delete_of_Resource + f_cse_preamble_subscriptionVerification(v_aeIndex_2, v_createRequest, int48);//AE2 registration + + v_resourceIndex := f_cse_createResource(int48, v_createRequest, v_aeIndex_1);//CrossResourceSubscription + + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + + if(vc_ae2.running) { + vc_ae2.stop; + }; + + // Test Body + vc_ae2.start(f_cse_notifyProcedure_noNotificationHandler()); + + v_updateRequest_1.filterCriteria.labels := v_labels_1; + f_cse_updateResource(int3, v_resourceIndex_1, v_updateRequest_1); // Update request 1 + + v_updateRequest_2.filterCriteria.labels := v_labels_2; + f_cse_updateResource(int3, v_resourceIndex_2, v_updateRequest_2); // Update request 2 + + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + + //Postamble + f_cse_postamble_deleteResources(); + + //Tear down + f_cf01Down(); + + } // end f_CSE_SUB_NTF_014 + + function f_CSE_SUB_NTF_015(in TimeWindowType p_timeWindowType) runs on AeSimu system CseSystem { + + // Local variables + var integer v_aeIndex_1 := -1; + var integer v_aeIndex_2 := -1; + var integer v_resourceIndex := -1; + var integer v_resourceIndex_1 := -1; + var integer v_resourceIndex_2 := -1; + var integer v_childResourceIndex_1 := -1; + var integer v_childResourceIndex_2 := -1; + var template RequestPrimitive v_createRequest := m_createContainerBase; + const ResourceType c_containerResourceType := int3; + var template RequestPrimitive v_updateRequest_1 := m_updateContainerBase; + var template RequestPrimitive v_updateRequest_2 := m_updateContainerBase; + var Labels v_labels_1:= {"VALUE_1"}; + var Labels v_labels_2:= {"VALUE_2"}; + var RequestPrimitive v_notificationRequest; + var AbsRelTimestamp myAbsRelTimestamp; + myAbsRelTimestamp.alt_1 := float2int(PX_TAC/2.0); + + // Test control + + // Test component configuration + f_cf01Up(true); + + // Test adapter configuration + + // Preamble + v_aeIndex_1 := f_cse_preamble_registerAe();//c_CRUDNDi); + v_resourceIndex_1 := f_cse_createResource(c_containerResourceType, v_createRequest, v_aeIndex_1);//Container_1 + v_resourceIndex_2 := f_cse_createResource(c_containerResourceType, v_createRequest, v_aeIndex_1);//Container_2 + + v_createRequest := m_createSubscriptionBase; + v_childResourceIndex_1 := f_cse_createResource(int23, v_createRequest, v_resourceIndex_1);//Subscription_1 + v_childResourceIndex_1 := f_cse_createResource(int23, v_createRequest, v_resourceIndex_2);//Subscription_2 + + v_createRequest := m_createCrossResourceSubscription("NotInitialized", -, {f_getResourceAddress(v_aeIndex_2)}, p_timeWindowType, myAbsRelTimestamp, "NullValue"); + v_createRequest.primitiveContent.crossResourceSubscription.subscriptionResourcesAsTarget := {f_getResourceAddress(v_resourceIndex_1), f_getResourceAddress(v_resourceIndex_2)}; + v_createRequest.primitiveContent.crossResourceSubscription.eventNotificationCriteriaSet.eventNotificationCriteriaEntry_list := {m_eventNotificationCriteria({int1})}; // Update_of_Resource + f_cse_preamble_subscriptionVerification(v_aeIndex_2, v_createRequest, int48);//AE2 registration + + v_resourceIndex := f_cse_createResource(int48, v_createRequest, v_aeIndex_1);//CrossResourceSubscription + + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + + if(vc_ae2.running) { + vc_ae2.stop; + }; + + // Test Body + vc_ae2.start(f_cse_notifyProcedure_defaultHandler()); + + v_updateRequest_1.filterCriteria.labels := v_labels_1; + f_cse_updateResource(int3, v_resourceIndex_1, v_updateRequest_1); // Update request 1 + v_updateRequest_2.filterCriteria.labels := v_labels_2; + f_cse_updateResource(int3, v_resourceIndex_2, v_updateRequest_2); // Update request 2 + + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + + v_notificationRequest := f_getRequestPrimitive(vc_ae2); + + if(f_compareURIs(v_resourceIndex, v_notificationRequest.primitiveContent.notification.subscriptionReference)) { + setverdict(pass, __SCOPE__ & ": Cross-Resource Notification received from crossResourceSubscription"); + } else { + setverdict(fail, __SCOPE__ & ": Cross-Resource Notification not received from crossResourceSubscription"); + } + + //Postamble + f_cse_postamble_deleteResources(); + + //Tear down + f_cf01Down(); + + } // end f_CSE_SUB_NTF_015 + + function f_CSE_SUB_NTF_016(in TimeWindowType p_timeWindowType) runs on AeSimu system CseSystem { + + // Local variables + var integer v_aeIndex_1 := -1; + var integer v_aeIndex_2 := -1; + var integer v_resourceIndex := -1; + var integer v_resourceIndex_1 := -1; + var integer v_resourceIndex_2 := -1; + var integer v_childResourceIndex_1 := -1; + var integer v_childResourceIndex_2 := -1; + var template RequestPrimitive v_createRequest := m_createContainerBase; + const ResourceType c_containerResourceType := int3; + var template RequestPrimitive v_updateRequest_1 := m_updateContainerBase; + var template RequestPrimitive v_updateRequest_2 := m_updateContainerBase; + var Labels v_labels_1:= {"VALUE_1"}; + var Labels v_labels_2:= {"VALUE_2"}; + var RequestPrimitive v_notificationRequest; + var AbsRelTimestamp myAbsRelTimestamp; + myAbsRelTimestamp.alt_1 := float2int(PX_TAC / 2.0); + timer t_notificationTimer := PX_TAC; + var float v_elapsedTime; + + // Test control + + // Test component configuration + f_cf01Up(true); + + // Test adapter configuration + + // Preamble + v_aeIndex_1 := f_cse_preamble_registerAe();//c_CRUDNDi); + v_resourceIndex_1 := f_cse_createResource(c_containerResourceType, v_createRequest, v_aeIndex_1);//Container_1 + v_resourceIndex_2 := f_cse_createResource(c_containerResourceType, v_createRequest, v_aeIndex_1);//Container_2 + + v_createRequest := m_createSubscriptionBase; + v_childResourceIndex_1 := f_cse_createResource(int23, v_createRequest, v_resourceIndex_1);//Subscription_1 + v_childResourceIndex_1 := f_cse_createResource(int23, v_createRequest, v_resourceIndex_2);//Subscription_2 + + v_createRequest := m_createCrossResourceSubscription("NotInitialized", -, {f_getResourceAddress(v_aeIndex_2)}, p_timeWindowType, myAbsRelTimestamp, "NullValue"); + v_createRequest.primitiveContent.crossResourceSubscription.subscriptionResourcesAsTarget := {f_getResourceAddress(v_resourceIndex_1), f_getResourceAddress(v_resourceIndex_2)}; + v_createRequest.primitiveContent.crossResourceSubscription.eventNotificationCriteriaSet.eventNotificationCriteriaEntry_list := {m_eventNotificationCriteria({int1})}; // Update_of_Resource + f_cse_preamble_subscriptionVerification(v_aeIndex_2, v_createRequest, int48);//AE2 registration + + v_resourceIndex := f_cse_createResource(int48, v_createRequest, v_aeIndex_1);//CrossResourceSubscription + + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + + if(vc_ae2.running) { + vc_ae2.stop; + }; + + // Test Body + vc_ae2.start(f_cse_notifyProcedure_noNotificationHandler()); + t_notificationTimer.start; + + v_updateRequest_1.filterCriteria.labels := v_labels_1; + f_cse_updateResource(int3, v_resourceIndex_1, v_updateRequest_1); // Update request 1 + + v_elapsedTime := t_notificationTimer.read; + while (v_elapsedTime < int2float(myAbsRelTimestamp.alt_1)){ // Wait until window size expires + v_elapsedTime := t_notificationTimer.read; + } + t_notificationTimer.stop; + + v_updateRequest_2.filterCriteria.labels := v_labels_2; + f_cse_updateResource(int3, v_resourceIndex_2, v_updateRequest_2); // Update request 2 + + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + + //Postamble + f_cse_postamble_deleteResources(); + + //Tear down + f_cf01Down(); + + } // end f_CSE_SUB_NTF_016 }//end group Notify @@ -9163,898 +10824,899 @@ module OneM2M_PermutationFunctions { group Basic_Operations { - function f_CSE_SEC_ACP_001(template RequestPrimitive p_requestPrimitive) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var integer v_aeIndex := -1; - var integer v_aeIndex2 := -1; - var integer v_acpIndex := -1; - var RequestPrimitive v_createRequest := valueof(m_createAcpBase); - var RequestPrimitive v_updateRequest; - var AccessControlRule v_accessControlRule_1; - var SetOfAcrs v_setOfArcs; + function f_CSE_SEC_ACP_001(template RequestPrimitive p_requestPrimitive) runs on AeSimu system CseSystem { + // Local variables + var MsgIn v_response; + var integer v_aeIndex := -1; + var integer v_aeIndex2 := -1; + var integer v_acpIndex := -1; + var RequestPrimitive v_createRequest := valueof(m_createAcpBase); + var RequestPrimitive v_updateRequest; + var AccessControlRule v_accessControlRule_1; + var SetOfAcrs v_setOfArcs; - // Test control + // Test control - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource - v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, -); - - vc_ae2.start(f_cse_createResource(int2, m_createAe(PX_TS_AE2.appId, -, PX_TS_AE2.aeIdStem, c_defaultAe2ResourceName, -), -1)); // AE2 is registred - f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); - - v_aeIndex2 := f_getLatestResource(vc_ae2); - - v_accessControlRule_1 := valueof(m_createAcr({ f_getOriginator(v_aeIndex), PX_SUPER_AE_ID}, int63)); - v_setOfArcs.accessControlRule_list := {v_accessControlRule_1}; - v_updateRequest := valueof(m_updateAcpPrivileges(v_setOfArcs, v_setOfArcs)); - f_cse_updateResource(int1, v_acpIndex, v_updateRequest); - - // Test Body - p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); - p_requestPrimitive.from_ := f_getResourceId(vc_resourcesList[v_aeIndex2].resource); - p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); + // Preamble + v_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource + v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, -); + + vc_ae2.start(f_cse_createResource(int2, m_createAe(PX_TS_AE2.appId, -, PX_TS_AE2.aeIdStem, c_defaultAe2ResourceName, -), -1)); // AE2 is registred + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + + v_aeIndex2 := f_getLatestResource(vc_ae2); + + v_accessControlRule_1 := valueof(m_createAcr({ f_getOriginator(v_aeIndex), PX_SUPER_AE_ID}, int63)); + v_setOfArcs.accessControlRule_list := {v_accessControlRule_1}; + v_updateRequest := valueof(m_updateAcpPrivileges(v_setOfArcs, v_setOfArcs)); + f_cse_updateResource(int1, v_acpIndex, v_updateRequest); + + // Test Body + p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); + p_requestPrimitive.from_ := f_getResourceId(vc_resourcesList[v_aeIndex2].resource); + p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); - f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int4103))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Operation denied because of lack of right on Container"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error operation have been accepted without having privileges"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while executing operation on resource type int3 (Container)"); - } + f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4103))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Operation denied because of lack of right on Container"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error operation have been accepted without having privileges"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while executing operation on resource type int3 (Container)"); } + } - //Postamble - //We are forced to delete the Ae because the delete request in the postamble_deleteResources is sent by Ae itself, witch doesn't have privileges - if(testcasename() == "TC_CSE_SEC_ACP_001_DEL") { - f_cse_deleteResource(v_aeIndex, m_delete(f_getResourceAddress(v_aeIndex), f_getOriginator()));//Use of PX_SUPER_AE_ID to remove AE - } - f_cse_postamble_deleteResources(); + //Postamble + //We are forced to delete the Ae because the delete request in the postamble_deleteResources is sent by Ae itself, witch doesn't have privileges + if(testcasename() == "TC_CSE_SEC_ACP_001_DEL") { + f_cse_deleteResource(v_aeIndex, m_delete(f_getResourceAddress(v_aeIndex), f_getOriginator()));//Use of PX_SUPER_AE_ID to remove AE + } + f_cse_postamble_deleteResources(); - //Tear down - f_cf01Down(); + //Tear down + f_cf01Down(); - } //end f_CSE_SEC_ACP_001 + } //end f_CSE_SEC_ACP_001 - function f_CSE_SEC_ACP_002(template RequestPrimitive p_requestPrimitive, in ResponseStatusCode p_responseStatusCode) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var integer v_aeIndex := -1; - var integer v_acpIndex1 := -1; - var integer v_acpIndex2 := -1; - var RequestPrimitive v_updateRequest; - var AccessControlRule v_accessControlRule_1; - var SetOfAcrs v_setOfArcs; + function f_CSE_SEC_ACP_002(template RequestPrimitive p_requestPrimitive, in ResponseStatusCode p_responseStatusCode) runs on AeSimu system CseSystem { + // Local variables + var MsgIn v_response; + var integer v_aeIndex := -1; + var integer v_acpIndex1 := -1; + var integer v_acpIndex2 := -1; + var RequestPrimitive v_updateRequest; + var AccessControlRule v_accessControlRule_1; + var SetOfAcrs v_setOfArcs; - // Test control + // Test control - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_acpIndex1 := f_cse_createResource(int1, m_createAcp("MyAcp1")); // CSE child resource - v_acpIndex2 := f_cse_createResource(int1, m_createAcp("MyAcp2")); // CSE child resource + // Preamble + v_acpIndex1 := f_cse_createResource(int1, m_createAcp("MyAcp1")); // CSE child resource + v_acpIndex2 := f_cse_createResource(int1, m_createAcp("MyAcp2")); // CSE child resource - v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex1].resource), f_getResourceId(vc_resourcesList[v_acpIndex2].resource)}, -); + v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex1].resource), f_getResourceId(vc_resourcesList[v_acpIndex2].resource)}, -); - v_accessControlRule_1 := valueof(m_createAcr({f_getOriginator(v_aeIndex)}, int3)); // c_CR - v_setOfArcs.accessControlRule_list := {v_accessControlRule_1}; - v_updateRequest := valueof(m_updateAcpPrivileges(v_setOfArcs, -)); - f_cse_updateResource(int1, v_acpIndex1, v_updateRequest); + v_accessControlRule_1 := valueof(m_createAcr({f_getOriginator(v_aeIndex)}, int3)); // c_CR + v_setOfArcs.accessControlRule_list := {v_accessControlRule_1}; + v_updateRequest := valueof(m_updateAcpPrivileges(v_setOfArcs, -)); + f_cse_updateResource(int1, v_acpIndex1, v_updateRequest); - v_accessControlRule_1 := valueof(m_createAcr({f_getOriginator(v_aeIndex)}, int60)); // c_UDNDi - v_setOfArcs.accessControlRule_list := {v_accessControlRule_1}; - v_updateRequest := valueof(m_updateAcpPrivileges(v_setOfArcs, -)); - f_cse_updateResource(int1, v_acpIndex2, v_updateRequest); + v_accessControlRule_1 := valueof(m_createAcr({f_getOriginator(v_aeIndex)}, int60)); // c_UDNDi + v_setOfArcs.accessControlRule_list := {v_accessControlRule_1}; + v_updateRequest := valueof(m_updateAcpPrivileges(v_setOfArcs, -)); + f_cse_updateResource(int1, v_acpIndex2, v_updateRequest); - // Test Body - p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); - p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); - p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); + // Test Body + p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); + p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); + p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); - f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(p_responseStatusCode))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Successful operation on resource type int2 (Ae)"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while operation on resource type int2 (Ae)"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while executing operation on resource type int2 (Ae)"); - } + f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(p_responseStatusCode))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Successful operation on resource type int2 (Ae)"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while operation on resource type int2 (Ae)"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while executing operation on resource type int2 (Ae)"); + } + } - //Postamble - f_cse_postamble_deleteResources(); + //Postamble + f_cse_postamble_deleteResources(); - //Tear down - f_cf01Down(); + //Tear down + f_cf01Down(); - } //end f_CSE_SEC_ACP_002 + } //end f_CSE_SEC_ACP_002 - function f_CSE_SEC_ACP_003(template RequestPrimitive p_requestPrimitive, in ResponseStatusCode p_responseStatusCode) runs on AeSimu system CseSystem{ - // Local variables - var MsgIn v_response; - var integer v_aeIndex := -1; - var integer v_acpIndex := -1; - var RequestPrimitive v_createRequest; - var AccessControlRule v_accessControlRule_1; - var RequestPrimitive v_updateRequest; - var SetOfAcrs v_setOfArcs; + function f_CSE_SEC_ACP_003(template RequestPrimitive p_requestPrimitive, in ResponseStatusCode p_responseStatusCode) runs on AeSimu system CseSystem{ + // Local variables + var MsgIn v_response; + var integer v_aeIndex := -1; + var integer v_acpIndex := -1; + var RequestPrimitive v_createRequest; + var AccessControlRule v_accessControlRule_1; + var RequestPrimitive v_updateRequest; + var SetOfAcrs v_setOfArcs; - // Test control + // Test control - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_createRequest := valueof(m_createAcp( -, {"testDomain"}, -)); - v_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource + // Preamble + v_createRequest := valueof(m_createAcp( -, {"testDomain"}, -)); + v_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource - v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, -); + v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, -); - // Test Body - p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); - p_requestPrimitive.from_ := "testDomain"; - p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); + // Test Body + p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); + p_requestPrimitive.from_ := "testDomain"; + p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); - f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(p_responseStatusCode))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Successful operation on resource type int2 (Ae)"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while operation on resource type int2 (Ae)"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while executing operation on resource type int2 (Ae)"); - } + f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(p_responseStatusCode))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Successful operation on resource type int2 (Ae)"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while operation on resource type int2 (Ae)"); } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while executing operation on resource type int2 (Ae)"); + } + } - //Postamble - v_accessControlRule_1 := valueof(m_createAcr({"all"}, int63)); - v_setOfArcs.accessControlRule_list := {v_accessControlRule_1}; - v_updateRequest := valueof(m_updateAcpPrivileges(v_setOfArcs, v_setOfArcs)); - v_updateRequest := f_getUpdateRequestPrimitive(int1, v_acpIndex, v_updateRequest); - v_updateRequest.from_ := "testDomain"; - f_send(e_mcaPort, m_request(v_updateRequest)); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - log(__SCOPE__ & ":INFO: Attribute of resource type ACP updated successfully"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - log(__SCOPE__ & ":INFO: Error while updating resource type ACP"); - } - [] tc_ac.timeout { - log(__SCOPE__ & ":INFO: No answer while updating resource type ACP"); - } + //Postamble + v_accessControlRule_1 := valueof(m_createAcr({"all"}, int63)); + v_setOfArcs.accessControlRule_list := {v_accessControlRule_1}; + v_updateRequest := valueof(m_updateAcpPrivileges(v_setOfArcs, v_setOfArcs)); + v_updateRequest := f_getUpdateRequestPrimitive(int1, v_acpIndex, v_updateRequest); + v_updateRequest.from_ := "testDomain"; + f_send(e_mcaPort, m_request(v_updateRequest)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + log(__SCOPE__ & ":INFO: Attribute of resource type ACP updated successfully"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + log(__SCOPE__ & ":INFO: Error while updating resource type ACP"); } + [] tc_ac.timeout { + log(__SCOPE__ & ":INFO: No answer while updating resource type ACP"); + } + } - f_cse_postamble_deleteResources(); + f_cse_postamble_deleteResources(); - //Tear down - f_cf01Down(); + //Tear down + f_cf01Down(); - }//end f_CSE_SEC_ACP_003 + }//end f_CSE_SEC_ACP_003 - function f_CSE_SEC_ACP_004(template RequestPrimitive p_requestPrimitive, in ResponseStatusCode p_responseStatusCode) runs on AeSimu system CseSystem{ - // Local variables - var MsgIn v_response; - var integer v_aeIndex := -1; - var integer v_aeIndex2 := -1; - var integer v_acpIndex := -1; - var RequestPrimitive v_createRequest; + function f_CSE_SEC_ACP_004(template RequestPrimitive p_requestPrimitive, in ResponseStatusCode p_responseStatusCode) runs on AeSimu system CseSystem{ + // Local variables + var MsgIn v_response; + var integer v_aeIndex := -1; + var integer v_aeIndex2 := -1; + var integer v_acpIndex := -1; + var RequestPrimitive v_createRequest; - // Test control + // Test control - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_createRequest := f_getCreateRequestPrimitive(int1, m_createAcpBase, -1); - v_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource + // Preamble + v_createRequest := f_getCreateRequestPrimitive(int1, m_createAcpBase, -1); + v_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource - v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, -); + v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, -); - vc_ae2.start(f_cse_createResource(int2, m_createAe(PX_TS_AE2.appId, -, PX_TS_AE2.aeIdStem, c_defaultAe2ResourceName, -), -1)); // AE2 is registred - f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); - - v_aeIndex2 := f_getLatestResource(vc_ae2); + vc_ae2.start(f_cse_createResource(int2, m_createAe(PX_TS_AE2.appId, -, PX_TS_AE2.aeIdStem, c_defaultAe2ResourceName, -), -1)); // AE2 is registred + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); - // Test Body - p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); - p_requestPrimitive.from_ := f_getResourceId(vc_resourcesList[v_aeIndex2].resource); - p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); + v_aeIndex2 := f_getLatestResource(vc_ae2); - f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(p_responseStatusCode))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Successful operation on resource type int2 (Ae)"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while operation on resource type int2 (Ae)"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while executing operation on resource type int2 (Ae)"); - } + // Test Body + p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); + p_requestPrimitive.from_ := f_getResourceId(vc_resourcesList[v_aeIndex2].resource); + p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); + + f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(p_responseStatusCode))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Successful operation on resource type int2 (Ae)"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while operation on resource type int2 (Ae)"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while executing operation on resource type int2 (Ae)"); + } + } - //Postamble - f_cse_postamble_deleteResources(); + //Postamble + f_cse_postamble_deleteResources(); - //Tear down - f_cf01Down(); + //Tear down + f_cf01Down(); - }//end f_CSE_SEC_ACP_004 + }//end f_CSE_SEC_ACP_004 - function f_CSE_SEC_ACP_005(template RequestPrimitive p_requestPrimitive, in ResponseStatusCode p_responseStatusCode) runs on AeSimu system CseSystem{ - // Local variables - var MsgIn v_response; - var integer v_aeIndex := -1; - var charstring v_currentTime; - var RequestPrimitive v_createRequest; - var AccessControlRule v_accessControlRule := valueof(m_createAcr({"all"}, int63)); + function f_CSE_SEC_ACP_005(template RequestPrimitive p_requestPrimitive, in ResponseStatusCode p_responseStatusCode) runs on AeSimu system CseSystem{ + // Local variables + var MsgIn v_response; + var integer v_aeIndex := -1; + var charstring v_currentTime; + var RequestPrimitive v_createRequest; + var AccessControlRule v_accessControlRule := valueof(m_createAcr({"all"}, int63)); - // Test control + // Test control - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_createRequest := f_getCreateRequestPrimitive(int1, m_createAcpBase, -1); - v_currentTime := fx_generateTimestamp(); - v_accessControlRule.accessControlContexts_list := {{{"* * * * " & int2str(f_getMonth(v_currentTime)) & " * *"}, omit, omit}}; - v_createRequest.primitiveContent.accessControlPolicy.privileges.accessControlRule_list := {v_accessControlRule}; - vc_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource + // Preamble + v_createRequest := f_getCreateRequestPrimitive(int1, m_createAcpBase, -1); + v_currentTime := fx_generateTimestamp(); + v_accessControlRule.accessControlContexts_list := {{{"* * * * " & int2str(f_getMonth(v_currentTime)) & " * *"}, omit, omit}}; + v_createRequest.primitiveContent.accessControlPolicy.privileges.accessControlRule_list := {v_accessControlRule}; + vc_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource - v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}, -); + v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}, -); - // Test Body - p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); - p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); - p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); + // Test Body + p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); + p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); + p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); - f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(p_responseStatusCode))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Successful operation on resource type int2 (Ae)"); - if(p_responseStatusCode == int2002) { - f_removeElementFromList(vc_resourcesIndexToBeDeleted, v_aeIndex); - } - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while operation on resource type int2 (Ae)"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while executing operation on resource type int2 (Ae)"); + f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(p_responseStatusCode))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Successful operation on resource type int2 (Ae)"); + if(p_responseStatusCode == int2002) { + f_removeElementFromList(vc_resourcesIndexToBeDeleted, v_aeIndex); } } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while operation on resource type int2 (Ae)"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while executing operation on resource type int2 (Ae)"); + } + } - //Postamble - f_cse_updateAcpAuxResource(int63); + //Postamble + f_cse_updateAcpAuxResource(int63); - f_cse_postamble_deleteResources(); + f_cse_postamble_deleteResources(); - //Tear down - f_cf01Down(); + //Tear down + f_cf01Down(); - }//end f_CSE_SEC_ACP_005 + }//end f_CSE_SEC_ACP_005 - function f_CSE_SEC_ACP_006(template RequestPrimitive p_requestPrimitive, in ResponseStatusCode p_responseStatusCode) runs on AeSimu system CseSystem{ - // Local variables - var MsgIn v_response; - var integer v_month; - var charstring v_currentTime; - var integer v_aeIndex := -1; - var RequestPrimitive v_createRequest; - var AccessControlRule v_accessControlRule := valueof(m_createAcr({"all"}, int63)); + function f_CSE_SEC_ACP_006(template RequestPrimitive p_requestPrimitive, in ResponseStatusCode p_responseStatusCode) runs on AeSimu system CseSystem{ + // Local variables + var MsgIn v_response; + var integer v_month; + var charstring v_currentTime; + var integer v_aeIndex := -1; + var RequestPrimitive v_createRequest; + var AccessControlRule v_accessControlRule := valueof(m_createAcr({"all"}, int63)); - // Test control + // Test control - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_createRequest := f_getCreateRequestPrimitive(int1, m_createAcpBase, -1); - v_currentTime := fx_generateTimestamp(); - v_month := f_getMonth(v_currentTime); - if(v_month == 12) { - v_month := 1; - } else { - v_month := v_month + 1; - } - v_accessControlRule.accessControlContexts_list := {{{"* * * * " & int2str(v_month) & " * *"}, omit, omit}}; - v_createRequest.primitiveContent.accessControlPolicy.privileges.accessControlRule_list := {v_accessControlRule}; - vc_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource + // Preamble + v_createRequest := f_getCreateRequestPrimitive(int1, m_createAcpBase, -1); + v_currentTime := fx_generateTimestamp(); + v_month := f_getMonth(v_currentTime); + if(v_month == 12) { + v_month := 1; + } else { + v_month := v_month + 1; + } + v_accessControlRule.accessControlContexts_list := {{{"* * * * " & int2str(v_month) & " * *"}, omit, omit}}; + v_createRequest.primitiveContent.accessControlPolicy.privileges.accessControlRule_list := {v_accessControlRule}; + vc_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource - v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}, -); + v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}, -); - // Test Body - p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); - p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); - p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); + // Test Body + p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); + p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); + p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); - f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int4103))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Operation denied due to lack of privileges, out of accessControlTimeWindow"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error operation have been accepted without having privileges"); - if(p_responseStatusCode == int2002) { - f_removeElementFromList(vc_resourcesIndexToBeDeleted, v_aeIndex); - } - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while executing operation"); + f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4103))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Operation denied due to lack of privileges, out of accessControlTimeWindow"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error operation have been accepted without having privileges"); + if(p_responseStatusCode == int2002) { + f_removeElementFromList(vc_resourcesIndexToBeDeleted, v_aeIndex); } } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while executing operation"); + } + } - //Postamble - f_cse_updateAcpAuxResource(int63); + //Postamble + f_cse_updateAcpAuxResource(int63); - f_cse_postamble_deleteResources(); + f_cse_postamble_deleteResources(); - //Tear down - f_cf01Down(); + //Tear down + f_cf01Down(); - }//end f_CSE_SEC_ACP_006 + }//end f_CSE_SEC_ACP_006 - function f_CSE_SEC_ACP_007(template RequestPrimitive p_requestPrimitive, in ResponseStatusCode p_responseStatusCode) runs on AeSimu system CseSystem{ - // Local variables - var MsgIn v_response; - var integer v_aeIndex := -1; - var integer v_acpIndex := -1; - var RequestPrimitive v_createRequest; - var AccessControlRule v_accessControlRule := valueof(m_createAcr({"all"}, int63)); + function f_CSE_SEC_ACP_007(template RequestPrimitive p_requestPrimitive, in ResponseStatusCode p_responseStatusCode) runs on AeSimu system CseSystem{ + // Local variables + var MsgIn v_response; + var integer v_aeIndex := -1; + var integer v_acpIndex := -1; + var RequestPrimitive v_createRequest; + var AccessControlRule v_accessControlRule := valueof(m_createAcr({"all"}, int63)); - // Test control + // Test control - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_createRequest := f_getCreateRequestPrimitive(int1, m_createAcpBase, -1); - v_accessControlRule.accessControlContexts_list := {{{}, omit, { choice := { countryCode := {"ES"}}}}}; - v_createRequest.primitiveContent.accessControlPolicy.privileges.accessControlRule_list := {v_accessControlRule}; - v_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource + // Preamble + v_createRequest := f_getCreateRequestPrimitive(int1, m_createAcpBase, -1); + v_accessControlRule.accessControlContexts_list := {{{}, omit, { choice := { countryCode := {"ES"}}}}}; + v_createRequest.primitiveContent.accessControlPolicy.privileges.accessControlRule_list := {v_accessControlRule}; + v_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource - //TODO How to indicate the location of the Originator (AE1)? - v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, -); + //TODO How to indicate the location of the Originator (AE1)? + v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, -); - // Test Body - p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); - p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); - p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); + // Test Body + p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); + p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); + p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); - f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(p_responseStatusCode))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Successful operation on resource type int2 (Ae)"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while operation on resource type int2 (Ae)"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while executing operation on resource type int2 (Ae)"); - } + f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(p_responseStatusCode))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Successful operation on resource type int2 (Ae)"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while operation on resource type int2 (Ae)"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while executing operation on resource type int2 (Ae)"); } + } - //Postamble - f_cse_postamble_deleteResources(); + //Postamble + f_cse_postamble_deleteResources(); - //Tear down - f_cf01Down(); + //Tear down + f_cf01Down(); - }//end f_CSE_SEC_ACP_007 + }//end f_CSE_SEC_ACP_007 - function f_CSE_SEC_ACP_008(template RequestPrimitive p_requestPrimitive, in ResponseStatusCode p_responseStatusCode) runs on AeSimu system CseSystem{ - // Local variables - var MsgIn v_response; - var integer v_aeIndex := -1; - var integer v_acpIndex := -1; - var RequestPrimitive v_createRequest; - var AccessControlRule v_accessControlRule := valueof(m_createAcr({"all"}, int63)); + function f_CSE_SEC_ACP_008(template RequestPrimitive p_requestPrimitive, in ResponseStatusCode p_responseStatusCode) runs on AeSimu system CseSystem{ + // Local variables + var MsgIn v_response; + var integer v_aeIndex := -1; + var integer v_acpIndex := -1; + var RequestPrimitive v_createRequest; + var AccessControlRule v_accessControlRule := valueof(m_createAcr({"all"}, int63)); - // Test control + // Test control - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_createRequest := f_getCreateRequestPrimitive(int1, m_createAcpBase, -1); - v_accessControlRule.accessControlContexts_list := {{{}, omit, { choice := { countryCode := {"ES"}}}}}; - v_createRequest.primitiveContent.accessControlPolicy.privileges.accessControlRule_list := {v_accessControlRule}; - v_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource + // Preamble + v_createRequest := f_getCreateRequestPrimitive(int1, m_createAcpBase, -1); + v_accessControlRule.accessControlContexts_list := {{{}, omit, { choice := { countryCode := {"ES"}}}}}; + v_createRequest.primitiveContent.accessControlPolicy.privileges.accessControlRule_list := {v_accessControlRule}; + v_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource - //TODO How to indicate the location of the Originator (AE1)? - v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, -); + //TODO How to indicate the location of the Originator (AE1)? + v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, -); - // Test Body - p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); - p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); - p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); + // Test Body + p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); + p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); + p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); - f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int4103))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Operation denied due to lack of privileges, out of accessControlTimeWindow"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error operation have been accepted without having privileges"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while executing operation"); - } + f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4103))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Operation denied due to lack of privileges, out of accessControlTimeWindow"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error operation have been accepted without having privileges"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while executing operation"); } + } - //Postamble - f_cse_postamble_deleteResources(); + //Postamble + f_cse_postamble_deleteResources(); - //Tear down - f_cf01Down(); + //Tear down + f_cf01Down(); - }//end f_CSE_SEC_ACP_008 + }//end f_CSE_SEC_ACP_008 - function f_CSE_SEC_ACP_009(template RequestPrimitive p_requestPrimitive, in ResponseStatusCode p_responseStatusCode) runs on AeSimu system CseSystem{ - // Local variables - var MsgIn v_response; - var integer v_aeIndex := -1; - var RequestPrimitive v_createRequest; - var AccessControlRule v_accessControlRule := valueof(m_createAcr({"all"}, int63)); + function f_CSE_SEC_ACP_009(template RequestPrimitive p_requestPrimitive, in ResponseStatusCode p_responseStatusCode) runs on AeSimu system CseSystem{ + // Local variables + var MsgIn v_response; + var integer v_aeIndex := -1; + var RequestPrimitive v_createRequest; + var AccessControlRule v_accessControlRule := valueof(m_createAcr({"all"}, int63)); - // Test control + // Test control - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_createRequest := f_getCreateRequestPrimitive(int1, m_createAcpBase, -1); - v_accessControlRule.accessControlContexts_list := {{{}, {{f_getIpv4Address(vc_aeSimuDesc.mcaPortIn)}, omit}, omit}}; - v_createRequest.primitiveContent.accessControlPolicy.privileges.accessControlRule_list := {v_accessControlRule}; - vc_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource + // Preamble + v_createRequest := f_getCreateRequestPrimitive(int1, m_createAcpBase, -1); + v_accessControlRule.accessControlContexts_list := {{{}, {{f_getIpv4Address(vc_aeSimuDesc.mcaPortIn)}, omit}, omit}}; + v_createRequest.primitiveContent.accessControlPolicy.privileges.accessControlRule_list := {v_accessControlRule}; + vc_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource - v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}, {f_getLocalPoA(vc_aeSimuDesc.mcaPortIn)}); + v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}, {f_getLocalPoA(vc_aeSimuDesc.mcaPortIn)}); + - // Test Body - p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); - p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); - p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); + // Test Body + p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); + p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); + p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); - f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(p_responseStatusCode))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Successful operation on resource type int2 (Ae)"); - if(p_responseStatusCode == int2002) { - f_removeElementFromList(vc_resourcesIndexToBeDeleted, v_aeIndex); - } - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while operation on resource type int2 (Ae)"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while executing operation on resource type int2 (Ae)"); + f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(p_responseStatusCode))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Successful operation on resource type int2 (Ae)"); + if(p_responseStatusCode == int2002) { + f_removeElementFromList(vc_resourcesIndexToBeDeleted, v_aeIndex); } } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while operation on resource type int2 (Ae)"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while executing operation on resource type int2 (Ae)"); + } + } - //Postamble - f_cse_updateAcpAuxResource(int63); + //Postamble + f_cse_updateAcpAuxResource(int63); - f_cse_postamble_deleteResources(); + f_cse_postamble_deleteResources(); - //Tear down - f_cf01Down(); + //Tear down + f_cf01Down(); - }//end f_CSE_SEC_ACP_009 + }//end f_CSE_SEC_ACP_009 - function f_CSE_SEC_ACP_010(template RequestPrimitive p_requestPrimitive, in ResponseStatusCode p_responseStatusCode) runs on AeSimu system CseSystem{ - // Local variables - var MsgIn v_response; - var integer v_aeIndex := -1; - var RequestPrimitive v_createRequest; - var AccessControlRule v_accessControlRule := valueof(m_createAcr({"all"}, int63)); + function f_CSE_SEC_ACP_010(template RequestPrimitive p_requestPrimitive, in ResponseStatusCode p_responseStatusCode) runs on AeSimu system CseSystem{ + // Local variables + var MsgIn v_response; + var integer v_aeIndex := -1; + var RequestPrimitive v_createRequest; + var AccessControlRule v_accessControlRule := valueof(m_createAcr({"all"}, int63)); - // Test control + // Test control - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_createRequest := f_getCreateRequestPrimitive(int1, m_createAcpBase, -1); - v_accessControlRule.accessControlContexts_list := {{{}, {{"240.0.0.0"}, omit}, omit}}; - v_createRequest.primitiveContent.accessControlPolicy.privileges.accessControlRule_list := {v_accessControlRule}; - vc_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource + // Preamble + v_createRequest := f_getCreateRequestPrimitive(int1, m_createAcpBase, -1); + v_accessControlRule.accessControlContexts_list := {{{}, {{"240.0.0.0"}, omit}, omit}}; + v_createRequest.primitiveContent.accessControlPolicy.privileges.accessControlRule_list := {v_accessControlRule}; + vc_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource - v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}, {f_getLocalPoA(vc_aeSimuDesc.mcaPortIn)}); + v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[vc_acpIndex].resource)}, {f_getLocalPoA(vc_aeSimuDesc.mcaPortIn)}); - // Test Body - p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); - p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); - p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); + // Test Body + p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); + p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); + p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); - f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int4103))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Operation denied due to lack of privileges, out of accessControlTimeWindow"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error operation have been accepted without having privileges"); - if(p_responseStatusCode == int2002) { - f_removeElementFromList(vc_resourcesIndexToBeDeleted, v_aeIndex); - } - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while executing operation"); + f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4103))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Operation denied due to lack of privileges, out of accessControlTimeWindow"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error operation have been accepted without having privileges"); + if(p_responseStatusCode == int2002) { + f_removeElementFromList(vc_resourcesIndexToBeDeleted, v_aeIndex); } } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while executing operation"); + } + } - //Postamble - f_cse_updateAcpAuxResource(int63); + //Postamble + f_cse_updateAcpAuxResource(int63); - f_cse_postamble_deleteResources(); + f_cse_postamble_deleteResources(); - //Tear down - f_cf01Down(); + //Tear down + f_cf01Down(); - }//end f_CSE_SEC_ACP_010 + }//end f_CSE_SEC_ACP_010 - function f_CSE_SEC_ACP_011(template RequestPrimitive p_requestPrimitive, in ResponseStatusCode p_responseStatusCode) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var integer v_aeIndex := -1; - var integer v_containerIndex := -1; + function f_CSE_SEC_ACP_011(template RequestPrimitive p_requestPrimitive, in ResponseStatusCode p_responseStatusCode) runs on AeSimu system CseSystem { + // Local variables + var MsgIn v_response; + var integer v_aeIndex := -1; + var integer v_containerIndex := -1; - // Test control + // Test control - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe(-, -); - v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + // Preamble + v_aeIndex := f_cse_preamble_registerAe(-, -); + v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); - // Test Body - p_requestPrimitive.to_ := f_getResourceAddress(v_containerIndex); - p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); - p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); + // Test Body + p_requestPrimitive.to_ := f_getResourceAddress(v_containerIndex); + p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); + p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); - f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(p_responseStatusCode))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Successful operation on resource type int3 (Container)"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while operation on resource type int3 (Container)"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while executing operation on resource type int3 (Container)"); - } + f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(p_responseStatusCode))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Successful operation on resource type int3 (Container)"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while operation on resource type int3 (Container)"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while executing operation on resource type int3 (Container)"); + } + } - //Postamble - f_cse_postamble_deleteResources(); + //Postamble + f_cse_postamble_deleteResources(); - //Tear down - f_cf01Down(); + //Tear down + f_cf01Down(); - } //end f_CSE_SEC_ACP_011 + } //end f_CSE_SEC_ACP_011 - function f_CSE_SEC_ACP_012(template RequestPrimitive p_requestPrimitive, in AccessControlOperations p_acor) runs on AeSimu system CseSystem { - // Local variables - var MsgIn v_response; - var integer v_aeIndex := -1; - var integer v_containerIndex := -1; - var integer v_acpIndex := -1; - var RequestPrimitive v_request; - var RequestPrimitive v_createRequest := valueof(m_createAcpBase); - var RequestPrimitive v_updateRequest; - var AccessControlRule v_accessControlRule_1, v_accessControlRule_2; - var SetOfAcrs v_setOfArcs; + function f_CSE_SEC_ACP_012(template RequestPrimitive p_requestPrimitive, in AccessControlOperations p_acor) runs on AeSimu system CseSystem { + // Local variables + var MsgIn v_response; + var integer v_aeIndex := -1; + var integer v_containerIndex := -1; + var integer v_acpIndex := -1; + var RequestPrimitive v_request; + var RequestPrimitive v_createRequest := valueof(m_createAcpBase); + var RequestPrimitive v_updateRequest; + var AccessControlRule v_accessControlRule_1, v_accessControlRule_2; + var SetOfAcrs v_setOfArcs; - // Test control + // Test control - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource - v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, -); - v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); + // Preamble + v_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource + v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, -); + v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex); - v_accessControlRule_1 := valueof(m_createAcr({PX_SUPER_AE_ID}, int63)); - v_accessControlRule_2 := valueof(m_createAcr({f_getOriginator(v_aeIndex)}, p_acor)); - v_setOfArcs.accessControlRule_list := {v_accessControlRule_1, v_accessControlRule_2}; - v_updateRequest := valueof(m_updateAcpPrivileges(v_setOfArcs, -)); - f_cse_updateResource(int1, v_acpIndex, v_updateRequest); + v_accessControlRule_1 := valueof(m_createAcr({PX_SUPER_AE_ID}, int63)); + v_accessControlRule_2 := valueof(m_createAcr({f_getOriginator(v_aeIndex)}, p_acor)); + v_setOfArcs.accessControlRule_list := {v_accessControlRule_1, v_accessControlRule_2}; + v_updateRequest := valueof(m_updateAcpPrivileges(v_setOfArcs, -)); + f_cse_updateResource(int1, v_acpIndex, v_updateRequest); - // Test Body - p_requestPrimitive.to_ := f_getResourceAddress(v_containerIndex); - p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); - p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); + // Test Body + p_requestPrimitive.to_ := f_getResourceAddress(v_containerIndex); + p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); + p_requestPrimitive.requestIdentifier := valueof(p_requestPrimitive.requestIdentifier) & f_rnd(1, 1000000); - f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int4103))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Operation denied because of lack of right on Container"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error operation have been accepted without having privileges"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while executing operation on resource type int3 (Container)"); - } + f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4103))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Operation denied because of lack of right on Container"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error operation have been accepted without having privileges"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while executing operation on resource type int3 (Container)"); } + } - //Postamble - //We are forced to delete the Ae because the delete request in the postamble_deleteResources is sent by Ae itself, witch doesn't have privileges - if(testcasename() == "TC_CSE_SEC_ACP_012_DEL") { - f_cse_deleteResource(v_aeIndex, m_delete(f_getResourceAddress(v_aeIndex), f_getOriginator()));//Use of PX_SUPER_AE_ID to remove AE - } - f_cse_postamble_deleteResources(); + //Postamble + //We are forced to delete the Ae because the delete request in the postamble_deleteResources is sent by Ae itself, witch doesn't have privileges + if(testcasename() == "TC_CSE_SEC_ACP_012_DEL") { + f_cse_deleteResource(v_aeIndex, m_delete(f_getResourceAddress(v_aeIndex), f_getOriginator()));//Use of PX_SUPER_AE_ID to remove AE + } + f_cse_postamble_deleteResources(); - //Tear down - f_cf01Down(); + //Tear down + f_cf01Down(); - } //end f_CSE_SEC_ACP_012 + } //end f_CSE_SEC_ACP_012 - function f_CSE_SEC_ACP_015(template RequestPrimitive p_request, in ResponseStatusCode p_responseStatusCode) runs on AeSimu system CseSystem { - // Local variables - var integer v_aeIndex := -1; - var integer v_acpIndex := -1; - var integer v_groupIndex := -1; - var XSD.AnyURI v_ae2ResourceAddress; - var template RequestPrimitive v_groupRequest := m_createGroup(1, -, omit, int2, -, -, -); - var template RequestPrimitive v_createRequest := valueof(m_createAcpBase); + function f_CSE_SEC_ACP_015(template RequestPrimitive p_request, in ResponseStatusCode p_responseStatusCode) runs on AeSimu system CseSystem { + // Local variables + var integer v_aeIndex := -1; + var integer v_acpIndex := -1; + var integer v_groupIndex := -1; + var XSD.AnyURI v_ae2ResourceAddress; + var template RequestPrimitive v_groupRequest := m_createGroup(1, -, omit, int2, -, -, -); + var template RequestPrimitive v_createRequest := valueof(m_createAcpBase); - // Test control + // Test control - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe(-, -); + // Preamble + v_aeIndex := f_cse_preamble_registerAe(-, -); - v_groupRequest.primitiveContent.group_.memberIDs := {f_getResourceId(vc_resourcesList[v_aeIndex].resource)}; + v_groupRequest.primitiveContent.group_.memberIDs := {f_getResourceId(vc_resourcesList[v_aeIndex].resource)}; - v_groupIndex := f_cse_createResource(int9, v_groupRequest, -); + v_groupIndex := f_cse_createResource(int9, v_groupRequest, -); - v_createRequest := m_createAcp(-, {f_getResourceId(vc_resourcesList[v_groupIndex].resource)} , -); + v_createRequest := m_createAcp(-, {f_getResourceId(vc_resourcesList[v_groupIndex].resource)} , -); - v_acpIndex := f_cse_createResource(int1, v_createRequest, -); + v_acpIndex := f_cse_createResource(int1, v_createRequest, -); - vc_ae2.start(f_cse_createResource(int2, m_createAe(PX_TS_AE2.appId, {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, PX_TS_AE2.aeIdStem, c_defaultAe2ResourceName, omit), -1)); // AE2 is registred - f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + vc_ae2.start(f_cse_createResource(int2, m_createAe(PX_TS_AE2.appId, {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, PX_TS_AE2.aeIdStem, c_defaultAe2ResourceName, omit), -1)); // AE2 is registred + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); - v_ae2ResourceAddress := f_getLatestResourceAddress(vc_ae2); + v_ae2ResourceAddress := f_getLatestResourceAddress(vc_ae2); - // Test Body - p_request.to_ := v_ae2ResourceAddress; - p_request.from_ := f_getOriginator(v_aeIndex); - p_request.requestIdentifier := valueof(p_request.requestIdentifier) & f_rnd(1, 1000000); + // Test Body + p_request.to_ := v_ae2ResourceAddress; + p_request.from_ := f_getOriginator(v_aeIndex); + p_request.requestIdentifier := valueof(p_request.requestIdentifier) & f_rnd(1, 1000000); - f_send(e_mcaPort, m_request(valueof(p_request))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(p_responseStatusCode))) -> value vc_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Successful operation on AE"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error while operation on resource AE"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while executing operation on resource AE"); - } + f_send(e_mcaPort, m_request(valueof(p_request))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(p_responseStatusCode))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Successful operation on AE"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while operation on resource AE"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while executing operation on resource AE"); } + } - //Postamble - f_cse_postamble_deleteResources(); + //Postamble + f_cse_postamble_deleteResources(); - //Tear down - f_cf01Down(); + //Tear down + f_cf01Down(); - } //end f_CSE_SEC_ACP_015 + } //end f_CSE_SEC_ACP_015 - function f_CSE_SEC_ACP_016(template RequestPrimitive p_request) runs on AeSimu system CseSystem { - // Local variables - var integer v_aeIndex := -1; - var integer v_ae3Index := -1; - var integer v_acpIndex := -1; - var integer v_groupIndex := -1; - var XSD.AnyURI v_ae2ResourceAddress; - var template RequestPrimitive v_groupRequest := m_createGroup(1, -, omit, int2, -, -, -); - var template RequestPrimitive v_createRequest := valueof(m_createAcpBase); + function f_CSE_SEC_ACP_016(template RequestPrimitive p_request) runs on AeSimu system CseSystem { + // Local variables + var integer v_aeIndex := -1; + var integer v_ae3Index := -1; + var integer v_acpIndex := -1; + var integer v_groupIndex := -1; + var XSD.AnyURI v_ae2ResourceAddress; + var template RequestPrimitive v_groupRequest := m_createGroup(1, -, omit, int2, -, -, -); + var template RequestPrimitive v_createRequest := valueof(m_createAcpBase); - // Test control + // Test control - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble - v_aeIndex := f_cse_preamble_registerAe(-, -); + // Preamble + v_aeIndex := f_cse_preamble_registerAe(-, -); - v_ae3Index := f_cse_createResource(int2, m_createAe("NMyApp3Id", -, "", "MyAe3", omit), -1); // AE3 is registred + v_ae3Index := f_cse_createResource(int2, m_createAe("NMyApp3Id", -, "", "MyAe3", omit), -1); // AE3 is registred - v_groupRequest.primitiveContent.group_.memberIDs := {f_getResourceId(vc_resourcesList[v_ae3Index].resource)}; + v_groupRequest.primitiveContent.group_.memberIDs := {f_getResourceId(vc_resourcesList[v_ae3Index].resource)}; - v_groupIndex := f_cse_createResource(int9, v_groupRequest, -); + v_groupIndex := f_cse_createResource(int9, v_groupRequest, -); - v_createRequest := m_createAcp(-, {f_getResourceId(vc_resourcesList[v_groupIndex].resource)} , -); + v_createRequest := m_createAcp(-, {f_getResourceId(vc_resourcesList[v_groupIndex].resource)} , -); - v_acpIndex := f_cse_createResource(int1, v_createRequest, -); + v_acpIndex := f_cse_createResource(int1, v_createRequest, -); - vc_ae2.start(f_cse_createResource(int2, m_createAe(PX_TS_AE2.appId, {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, PX_TS_AE2.aeIdStem, c_defaultAe2ResourceName, omit), -1)); // AE2 is registred - f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + vc_ae2.start(f_cse_createResource(int2, m_createAe(PX_TS_AE2.appId, {f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, PX_TS_AE2.aeIdStem, c_defaultAe2ResourceName, omit), -1)); // AE2 is registred + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); - v_ae2ResourceAddress := f_getLatestResourceAddress(vc_ae2); + v_ae2ResourceAddress := f_getLatestResourceAddress(vc_ae2); - // Test Body - p_request.to_ := v_ae2ResourceAddress; - p_request.from_ := f_getOriginator(v_aeIndex); - p_request.requestIdentifier := valueof(p_request.requestIdentifier) & f_rnd(1, 1000000); + // Test Body + p_request.to_ := v_ae2ResourceAddress; + p_request.from_ := f_getOriginator(v_aeIndex); + p_request.requestIdentifier := valueof(p_request.requestIdentifier) & f_rnd(1, 1000000); - f_send(e_mcaPort, m_request(valueof(p_request))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int4103))) -> value vc_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Operation denied because of lack of right on AE"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error, successful operation response when having no privilege on AE"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while executing operation on resource AE"); - } + f_send(e_mcaPort, m_request(valueof(p_request))); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4103))) -> value vc_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Operation denied because of lack of right on AE"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error, successful operation response when having no privilege on AE"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while executing operation on resource AE"); } + } - //Postamble - f_cse_postamble_deleteResources(); + //Postamble + f_cse_postamble_deleteResources(); - //Tear down - f_cf01Down(); + //Tear down + f_cf01Down(); - } //end f_CSE_SEC_ACP_016 + } //end f_CSE_SEC_ACP_016 }// end of Basic_Operations @@ -10101,8 +11763,8 @@ module OneM2M_PermutationFunctions { // Test Body if (ispresent (p_requestUpdatePrimitive)) { v_resourceIndex := f_cse_createResource(p_resourceType, p_requestCreatePrimitive, v_aeIndex); - v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_requestUpdatePrimitive); - v_responsePrimitive.responseStatusCode := int2004; + v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_requestUpdatePrimitive); + v_responsePrimitive.responseStatusCode := int2004; } else { if (p_resourceType == int4) { v_create := m_createContainerBase; @@ -10113,6 +11775,7 @@ module OneM2M_PermutationFunctions { v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestCreatePrimitive, v_resourceIndex); //Retrieve the parent resource index v_parentIndex := f_getLatestLocalResourceIndex(vc_cse1); + } else if (p_resourceType == int30) { v_create := m_createTimeSeriesBase; v_create.primitiveContent.timeSeries.announceTo := {PX_TS_CSE1.cseId}; @@ -10126,17 +11789,17 @@ module OneM2M_PermutationFunctions { v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestCreatePrimitive, v_aeIndex); } - v_responsePrimitive.responseStatusCode := int2001; + v_responsePrimitive.responseStatusCode := int2001; } - vc_cse1.start(f_cse_announcementProcedure_createHandler(p_createRequestAnnc, -, v_parentIndex)); + vc_cse1.start(f_cse_announcementProcedure_createHandler(p_createRequestAnnc, -, v_parentIndex)); f_send(e_mcaPort, m_request(v_request)); tc_ac.start; alt { [] mcaPort.receive(mw_response(mw_responsePrimitive(v_responsePrimitive.responseStatusCode))) -> value vc_response { tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Operation for resource " & int2str(enum2int(p_resourceType)) & " performed successfully"); + setverdict(pass, __SCOPE__ & ": Operation for resource " & int2str(enum2int(p_resourceType)) & " performed successfully"); } [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { tc_ac.stop; @@ -10162,35 +11825,35 @@ module OneM2M_PermutationFunctions { group Create { function f_CSE_ANNC_CRE_001(ResourceType p_resourceType,template RequestPrimitive p_createRequestAnnc, in template RequestPrimitive p_requestCreatePrimitive := omit) runs on AeSimu system CseSystem { - //Local variables - var integer v_aeIndex := -1; - var template RequestPrimitive v_create := m_createAe(PX_TS_AE1.appId, omit, omit); - v_create.primitiveContent.aE.announceTo := {PX_TS_CSE1.cseId}; - //Test control + //Local variables + var integer v_aeIndex := -1; + var template RequestPrimitive v_create := m_createAe(PX_TS_AE1.appId, omit, omit); + v_create.primitiveContent.aE.announceTo := {PX_TS_CSE1.cseId}; + //Test control - //Test component configuration - f_cf02Up(); + //Test component configuration + f_cf02Up(); - //Register the CSE - vc_cse1.start(f_cse_registerRemoteCse(m_createRemoteCSE_poa(-, -, -, -, -, {f_getLocalPoA()}))); + //Register the CSE + vc_cse1.start(f_cse_registerRemoteCse(m_createRemoteCSE_poa(-, -, -, -, -, {f_getLocalPoA()}))); - f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); - //Preamble - vc_cse1.start(f_cse_announcementProcedure_createHandler(mw_createAEAnnc(-, -, -))); - v_aeIndex := f_cse_createResource(int2,v_create); + //Preamble + vc_cse1.start(f_cse_announcementProcedure_createHandler(mw_createAEAnnc(-, -, -))); + v_aeIndex := f_cse_createResource(int2,v_create); - f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); - vc_cse1.start(f_cse_announcementProcedure_createHandler(p_createRequestAnnc)); - f_cse_createResource(p_resourceType, p_requestCreatePrimitive, v_aeIndex); - vc_cse1.done; + vc_cse1.start(f_cse_announcementProcedure_createHandler(p_createRequestAnnc)); + f_cse_createResource(p_resourceType, p_requestCreatePrimitive, v_aeIndex); + vc_cse1.done; - //Postamble - f_cse_postamble_deleteResources(); + //Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf02Down(); + // Tear down + f_cf02Down(); } //end f_CSE_ANNC_CRE_001 function f_CSE_ANNC_CRE_002(ResourceType p_resourceType, template RequestPrimitive p_createRequest, in template RequestPrimitive p_updateRequest := omit, in template RequestPrimitive p_createRequestAnnc) runs on CseSimu system CseSystem { @@ -10210,7 +11873,7 @@ module OneM2M_PermutationFunctions { // Test adapter configuration //Register the CSE - f_cse_registerRemoteCse(v_createRemoteCse); + f_cse_registerRemoteCse(v_createRemoteCse); //Preamble vc_ae1.start(f_cse_preamble_registerAe()); @@ -10233,7 +11896,7 @@ module OneM2M_PermutationFunctions { //Then, IUT announces the resource on the remoteCSEAnnc resource v_remoteCSEAnncAddress := f_getLatestLocalResourceAddress(vc_cse2); - p_createRequestAnnc.to_ := v_remoteCSEAnncAddress; + p_createRequestAnnc.to_ := v_remoteCSEAnncAddress; f_cse_announcementProcedure_createHandler(p_createRequestAnnc, -, omit); @@ -10340,11 +12003,11 @@ module OneM2M_PermutationFunctions { //IUT shall announce itself by updating announceTo attribute of its remoteCSE on its registrar (CSE1) v_updateRemoteCse.primitiveContent.remoteCSE.announceTo := {PX_TS_CSE2.cseId}; - f_cse_updateResourceHandler(vc_localRemoteCseIndex, v_updateRemoteCse); + f_cse_updateResourceHandler(vc_localRemoteCseIndex, v_updateRemoteCse); //Then, IUT announces the resource on the remoteCSEAnnc v_remoteCSEAnncAddress := f_getLatestLocalResourceAddress(vc_cse2); - v_createContainerAnnc.to_ := v_remoteCSEAnncAddress; + v_createContainerAnnc.to_ := v_remoteCSEAnncAddress; f_cse_announcementProcedure_createHandler(v_createContainerAnnc, -, omit); @@ -10452,11 +12115,11 @@ module OneM2M_PermutationFunctions { //IUT shall announce itself by updating announceTo attribute of its remoteCSE on its registrar (CSE1) v_updateRemoteCse.primitiveContent.remoteCSE.announceTo := {PX_TS_CSE2.cseId}; - f_cse_updateResourceHandler(vc_localRemoteCseIndex, v_updateRemoteCse); + f_cse_updateResourceHandler(vc_localRemoteCseIndex, v_updateRemoteCse); //Then, IUT announces the resource on the remoteCSEAnnc v_remoteCSEAnncAddress := f_getLatestLocalResourceAddress(vc_cse2); - p_createRequestAnnc.to_ := v_remoteCSEAnncAddress; + p_createRequestAnnc.to_ := v_remoteCSEAnncAddress; f_cse_announcementProcedure_createHandler(p_createRequestAnnc, -, omit); @@ -10615,7 +12278,7 @@ module OneM2M_PermutationFunctions { p_createRequestAnnc.primitiveContent := f_setExpirationTime(valueof(p_createRequestAnnc.primitiveContent), vc_resourcesList[v_originalResourceIndex].resource); vc_cse1.start(f_cse_createResource_cseSimu(f_getAnnouncedResourceType(p_resourceType), p_createRequestAnnc, v_remoteCSEIndex)); - f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); v_resourceAnncAddress := f_getLatestResourceAddress(vc_cse1, -, -); @@ -10783,7 +12446,7 @@ module OneM2M_PermutationFunctions { [] tc_ac.timeout { setverdict(fail, __SCOPE__ & ":ERROR: No announcement received"); } - } + } f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1); @@ -10822,7 +12485,7 @@ module OneM2M_PermutationFunctions { v_aeIndex := f_getLatestResourceIndex(vc_ae1); vc_ae1.start(f_cse_createResource(p_resourceType,p_requestCreatePrimitive, v_aeIndex)); - v_announcedResourceIndex := f_cse_announcementProcedure_createHandler(p_createRequestAnnc, -, vc_localRemoteCseIndex); + v_announcedResourceIndex := f_cse_announcementProcedure_createHandler(p_createRequestAnnc, -, vc_localRemoteCseIndex); f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1); v_resourceIndex := f_getLatestResourceIndex(vc_ae1); @@ -10886,7 +12549,7 @@ module OneM2M_PermutationFunctions { // Test Body vc_cse1.start(f_cse_announcementProcedure_createHandler(p_createRequestAnnc, -, v_localRemoteCseIndex)); - v_resourceIndex := f_cse_createResource(p_resourceType,p_requestCreatePrimitive, v_aeIndex); + v_resourceIndex := f_cse_createResource(p_resourceType,p_requestCreatePrimitive, v_aeIndex); f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); v_announcedResourceIndex := f_getLatestLocalResourceIndex(vc_cse1); @@ -10956,7 +12619,7 @@ module OneM2M_PermutationFunctions { //Preamble vc_cse1.start(f_cse_announcementProcedure_createHandler(mw_createAEAnnc(-, -, -))); v_aeIndex := f_cse_createResource(int2,v_create); - f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); v_aEAnncIndex := f_getLatestLocalResourceIndex(vc_cse1); @@ -10989,7 +12652,7 @@ module OneM2M_PermutationFunctions { } } - f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); // Postamble f_cse_postamble_deleteResources(); @@ -11027,7 +12690,7 @@ module OneM2M_PermutationFunctions { // Test Body vc_ae1.start(f_cse_createResource(p_resourceType,p_requestCreatePrimitive, v_aeIndex)); - v_announcedResourceIndex := f_cse_announcementProcedure_createHandler(p_createRequestAnnc, -, vc_localRemoteCseIndex); + v_announcedResourceIndex := f_cse_announcementProcedure_createHandler(p_createRequestAnnc, -, vc_localRemoteCseIndex); f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1); v_resourceIndex := f_getLatestResourceIndex(vc_ae1); @@ -11114,7 +12777,7 @@ module OneM2M_PermutationFunctions { //Then, IUT announces the resource on the remoteCSEAnnc v_remoteCSEAnncAddress := f_getLatestLocalResourceAddress(vc_cse2); - p_createRequestAnnc.to_ := v_remoteCSEAnncAddress; + p_createRequestAnnc.to_ := v_remoteCSEAnncAddress; f_cse_announcementProcedure_createHandler(p_createRequestAnnc, -, omit); @@ -11214,7 +12877,7 @@ module OneM2M_PermutationFunctions { // Test Body vc_cse1.start(f_cse_announcementProcedure_createHandler(p_createRequestAnnc, -, v_localRemoteCseIndex)); - v_resourceIndex := f_cse_createResource(p_resourceType,p_requestCreatePrimitive, v_aeIndex); + v_resourceIndex := f_cse_createResource(p_resourceType,p_requestCreatePrimitive, v_aeIndex); f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); v_announcedResourceIndex := f_getLatestLocalResourceIndex(vc_cse1); @@ -11279,7 +12942,7 @@ module OneM2M_PermutationFunctions { // Test Body vc_ae1.start(f_cse_createResource(p_resourceType,p_requestCreatePrimitive, v_aeIndex)); - v_announcedResourceIndex := f_cse_announcementProcedure_createHandler(p_createRequestAnnc); + v_announcedResourceIndex := f_cse_announcementProcedure_createHandler(p_createRequestAnnc); f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1); v_resourceIndex := f_getLatestResourceIndex(vc_ae1); @@ -11340,7 +13003,7 @@ module OneM2M_PermutationFunctions { // Test Body vc_ae1.start(f_cse_createResource(p_resourceType,p_requestCreatePrimitive, v_aeIndex)); - v_announcedResourceIndex := f_cse_announcementProcedure_createHandler(p_createRequestAnnc); + v_announcedResourceIndex := f_cse_announcementProcedure_createHandler(p_createRequestAnnc); f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1); v_resourceIndex := f_getLatestResourceIndex(vc_ae1); @@ -11401,7 +13064,7 @@ module OneM2M_PermutationFunctions { // Test Body vc_ae1.start(f_cse_createResource(p_resourceType,p_requestCreatePrimitive, v_aeIndex)); - v_announcedResourceIndex := f_cse_announcementProcedure_createHandler(p_createRequestAnnc); + v_announcedResourceIndex := f_cse_announcementProcedure_createHandler(p_createRequestAnnc); f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1); v_resourceIndex := f_getLatestResourceIndex(vc_ae1); @@ -11460,7 +13123,7 @@ module OneM2M_PermutationFunctions { // Test Body vc_ae1.start(f_cse_createResource(p_resourceType,p_requestCreatePrimitive, v_aeIndex)); - v_announcedResourceIndex := f_cse_announcementProcedure_createHandler(p_createRequestAnnc); + v_announcedResourceIndex := f_cse_announcementProcedure_createHandler(p_createRequestAnnc); f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1); v_resourceIndex := f_getLatestResourceIndex(vc_ae1); @@ -11528,7 +13191,7 @@ module OneM2M_PermutationFunctions { // Test Body vc_cse1.start(f_cse_announcementProcedure_createHandler(p_createRequestAnnc, -, v_localRemoteCseIndex)); - v_resourceIndex := f_cse_createResource(p_resourceType,p_requestCreatePrimitive, v_aeIndex); + v_resourceIndex := f_cse_createResource(p_resourceType,p_requestCreatePrimitive, v_aeIndex); f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); v_announcedResourceIndex := f_getLatestLocalResourceIndex(vc_cse1); @@ -11595,7 +13258,7 @@ module OneM2M_PermutationFunctions { v_aeIndex := f_cse_createResource(int2,v_create); // Test Body - v_resourceIndex := f_cse_createResource(p_resourceType,p_requestCreatePrimitive, v_aeIndex); + v_resourceIndex := f_cse_createResource(p_resourceType,p_requestCreatePrimitive, v_aeIndex); // Test Body vc_cse1.start(f_cse_announcementProcedure_createHandler(p_createRequestAnnc, int4000, v_localRemoteCseIndex)); @@ -11642,26 +13305,26 @@ module OneM2M_PermutationFunctions { function f_CSE_ANNC_DEL_001(ResourceType p_resourceType,template RequestPrimitive p_createRequestAnnc, in template RequestPrimitive p_requestCreatePrimitive := omit) runs on AeSimu system CseSystem { //Local variables var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; - //Test control + //Test control - //Test component configuration - f_cf02Up(); + //Test component configuration + f_cf02Up(); //Register the CSE vc_cse1.start(f_cse_registerRemoteCse(m_createRemoteCSE_poa(-, -, -, -, -, {f_getLocalPoA()}))); f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); - //Preamble - v_aeIndex := f_cse_preamble_registerAe(); + //Preamble + v_aeIndex := f_cse_preamble_registerAe(); - vc_cse1.start(f_cse_announcementProcedure_createHandler(p_createRequestAnnc)); + vc_cse1.start(f_cse_announcementProcedure_createHandler(p_createRequestAnnc)); v_resourceIndex := f_cse_createResource(p_resourceType, p_requestCreatePrimitive, v_aeIndex); - f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1); - vc_cse1.start(f_cse_announcementProcedure_deleteHandler()); + vc_cse1.start(f_cse_announcementProcedure_deleteHandler()); v_request := valueof(m_delete(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex))); f_send(e_mcaPort, m_request(v_request)); @@ -11693,11 +13356,11 @@ module OneM2M_PermutationFunctions { setverdict(fail, __SCOPE__ & ":ERROR: Resource not deleted"); } - //Postamble - f_cse_postamble_deleteResources(); + //Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf02Down(); + // Tear down + f_cf02Down(); } //end f_CSE_ANNC_DEL_001 function f_CSE_ANNC_DEL_002(ResourceType p_resourceType, template RequestPrimitive p_createRequestAnnc, in template RequestPrimitive p_requestCreatePrimitive := omit) runs on CseSimu system CseSystem { @@ -11718,14 +13381,14 @@ module OneM2M_PermutationFunctions { //Preamble - vc_ae1.start(f_cse_preamble_registerAe()); + vc_ae1.start(f_cse_preamble_registerAe()); f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1); v_aeIndex:= f_getLatestResourceIndex(vc_ae1); vc_ae1.start(f_cse_createResource(p_resourceType, p_requestCreatePrimitive, v_aeIndex)); - v_announcedResourceIndex := f_cse_announcementProcedure_createHandler(p_createRequestAnnc); - f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1); + v_announcedResourceIndex := f_cse_announcementProcedure_createHandler(p_createRequestAnnc); + f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1); // Test Body v_latestResourceIndex := f_getLatestResourceIndex(vc_ae1); @@ -11767,8 +13430,8 @@ module OneM2M_PermutationFunctions { /** * @desc Check that the IUT rejects a <pollingChannel> OPERATION of the AE when AE-ID is not same as the AE-ID of the parent resource - * - */ + * + */ function f_CSE_PCH_005(template RequestPrimitive p_requestPrimitive) runs on AeSimu system CseSystem { //Local variables @@ -11799,7 +13462,7 @@ module OneM2M_PermutationFunctions { v_resourceIndex := f_cse_createResource(int15, m_createPollingChannelBase, v_aeIndex1); p_requestPrimitive.to_ := f_getResourceAddress(v_resourceIndex); - p_requestPrimitive.from_ := f_getOriginator(v_aeIndex2); + p_requestPrimitive.from_ := f_getOriginator(v_aeIndex2); f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); tc_ac.start; @@ -11815,16 +13478,16 @@ module OneM2M_PermutationFunctions { [] tc_ac.timeout { setverdict(fail, __SCOPE__&":INFO: No answer while creating polling resource type"); } - } + } //Postamble f_cse_postamble_deleteResources(); // Tear down f_cf01Down(); - } + } - } //end group PollingChannel + } //end group PollingChannel group Response_Type { @@ -11854,12 +13517,12 @@ module OneM2M_PermutationFunctions { v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); if(ispresent(p_parentRequestPrimitive)) { - v_resourceIndex := f_cse_createResource(valueof(p_parentRequestPrimitive.resourceType), p_parentRequestPrimitive, v_aeIndex); + v_resourceIndex := f_cse_createResource(valueof(p_parentRequestPrimitive.resourceType), p_parentRequestPrimitive, v_aeIndex); p_requestPrimitive.to_ := f_getResourceAddress(v_resourceIndex); }else{ p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); } - p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); + p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); p_requestPrimitive.responseType := {int3, omit}; //BlockingRequest // Test Body @@ -11892,669 +13555,669 @@ module OneM2M_PermutationFunctions { // Tear down f_cf01Down(); - }//end f_CSE_RT_BR_001 + }//end f_CSE_RT_BR_001 } - group Non_Blocking_Requests{ + group Non_Blocking_Requests{ - group Synchronous{ + group Synchronous{ function f_CSE_RT_NBS_001(template RequestPrimitive p_requestPrimitive, in template (omit) RequestPrimitive p_parentRequestPrimitive := omit) runs on AeSimu system CseSystem{ - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; - // Test control - if(PICS_NON_BLOCKING_REQUEST_SYNCH){ - setverdict(inconc, __SCOPE__ & ": It is required to not support Non-blocking access resource in synchronous mode to run this test case"); - stop; - } + // Test control + if(PICS_NON_BLOCKING_REQUEST_SYNCH){ + setverdict(inconc, __SCOPE__ & ": It is required to not support Non-blocking access resource in synchronous mode to run this test case"); + stop; + } - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble + // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - if(ispresent(p_parentRequestPrimitive)) { - v_resourceIndex := f_cse_createResource(valueof(p_parentRequestPrimitive.resourceType), p_parentRequestPrimitive, v_aeIndex); - p_requestPrimitive.to_ := f_getResourceAddress(v_resourceIndex); - }else{ - p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); - } - p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); - p_requestPrimitive.responseType := {int1, omit}; //nonBlockingRequestSynch + if(ispresent(p_parentRequestPrimitive)) { + v_resourceIndex := f_cse_createResource(valueof(p_parentRequestPrimitive.resourceType), p_parentRequestPrimitive, v_aeIndex); + p_requestPrimitive.to_ := f_getResourceAddress(v_resourceIndex); + }else{ + p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); + } + p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); + p_requestPrimitive.responseType := {int1, omit}; //nonBlockingRequestSynch - // Test Body + // Test Body f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int5206))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": Operation rejected because Non-blocking access resource in synchronous mode is not supported"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Error operation have been accepted without supporting Non-Blocking Requests"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while executing a Non-blocking access resource in synchronous mode operation"); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int5206))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Operation rejected because Non-blocking access resource in synchronous mode is not supported"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error operation have been accepted without supporting Non-Blocking Requests"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while executing a Non-blocking access resource in synchronous mode operation"); + } } - } - f_checkAeSimuStatus(); + f_checkAeSimuStatus(); - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); }//end f_CSE_RT_NBS_001 function f_CSE_RT_NBS_002(template RequestPrimitive p_requestPrimitive, in template (omit) RequestPrimitive p_parentRequestPrimitive := omit) runs on AeSimu system CseSystem{ - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var template PrimitiveContent v_contentResponse; + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var template PrimitiveContent v_contentResponse; - // Test control - if(not PICS_NON_BLOCKING_REQUEST_SYNCH){ - setverdict(inconc, __SCOPE__ & ": It is required to support Non-blocking access resource in synchronous mode to run this test case"); - stop; - } + // Test control + if(not PICS_NON_BLOCKING_REQUEST_SYNCH){ + setverdict(inconc, __SCOPE__ & ": It is required to support Non-blocking access resource in synchronous mode to run this test case"); + stop; + } - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble + // Preamble - v_contentResponse.uRI := ?; + v_contentResponse.uRI := ?; - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - if(ispresent(p_parentRequestPrimitive)) { - v_resourceIndex := f_cse_createResource(valueof(p_parentRequestPrimitive.resourceType), p_parentRequestPrimitive, v_aeIndex); - p_requestPrimitive.to_ := f_getResourceAddress(v_resourceIndex); - }else{ - p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); - } - p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); - p_requestPrimitive.responseType := {int1,omit}; //nonBlockingRequestSynch + if(ispresent(p_parentRequestPrimitive)) { + v_resourceIndex := f_cse_createResource(valueof(p_parentRequestPrimitive.resourceType), p_parentRequestPrimitive, v_aeIndex); + p_requestPrimitive.to_ := f_getResourceAddress(v_resourceIndex); + }else{ + p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); + } + p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); + p_requestPrimitive.responseType := {int1,omit}; //nonBlockingRequestSynch - // Test Body + // Test Body f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int1001, v_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": URI attribute is set to <request> resource address"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitive(int1001))) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": URI attribute is not set to <request> resource address"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while executing a Non-blocking access resource in synchronous mode operation"); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int1001, v_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": URI attribute is set to <request> resource address"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitive(int1001))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": URI attribute is not set to <request> resource address"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while executing a Non-blocking access resource in synchronous mode operation"); + } } - } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); }//end f_CSE_RT_NBS_002 function f_CSE_RT_NBS_003(template RequestPrimitive p_requestPrimitive, in template (omit) RequestPrimitive p_parentRequestPrimitive := omit, in Operation p_operation) runs on AeSimu system CseSystem{ - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var template PrimitiveContent v_contentResponseUri; - var template PrimitiveContent v_contentResponseRequestResource; - var RequestStatus v_requestStatus; - var URI v_requestResourceURI; - var ResponseStatusCode v_statusCode; - var template PrimitiveContent v_primitiveContent; + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var template PrimitiveContent v_contentResponseUri; + var template PrimitiveContent v_contentResponseRequestResource; + var RequestStatus v_requestStatus; + var URI v_requestResourceURI; + var ResponseStatusCode v_statusCode; + var template PrimitiveContent v_primitiveContent; - // Test control - if(not PICS_NON_BLOCKING_REQUEST_SYNCH){ - setverdict(inconc, __SCOPE__ & ": It is required to support Non-blocking access resource in synchronous mode to run this test case"); - stop; - } + // Test control + if(not PICS_NON_BLOCKING_REQUEST_SYNCH){ + setverdict(inconc, __SCOPE__ & ": It is required to support Non-blocking access resource in synchronous mode to run this test case"); + stop; + } - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble + // Preamble - v_contentResponseUri.uRI := ?; + v_contentResponseUri.uRI := ?; - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - if(ispresent(p_parentRequestPrimitive)) { - v_resourceIndex := f_cse_createResource(valueof(p_parentRequestPrimitive.resourceType), p_parentRequestPrimitive, v_aeIndex); - p_requestPrimitive.to_ := f_getResourceAddress(v_resourceIndex); - }else{ - p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); - } - p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); - p_requestPrimitive.responseType := {int1, omit}; //nonBlockingRequestSynch + if(ispresent(p_parentRequestPrimitive)) { + v_resourceIndex := f_cse_createResource(valueof(p_parentRequestPrimitive.resourceType), p_parentRequestPrimitive, v_aeIndex); + p_requestPrimitive.to_ := f_getResourceAddress(v_resourceIndex); + }else{ + p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); + } + p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); + p_requestPrimitive.responseType := {int1, omit}; //nonBlockingRequestSynch - // Test Body + // Test Body f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int1001, v_contentResponseUri))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": URI attribute is set to <request> resource address"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitive(int1001))) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": URI attribute is not set to <request> resource address"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while executing a Non-blocking access resource in synchronous mode operation"); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int1001, v_contentResponseUri))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": URI attribute is set to <request> resource address"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitive(int1001))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": URI attribute is not set to <request> resource address"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while executing a Non-blocking access resource in synchronous mode operation"); + } } - } - f_checkAeSimuStatus(); + f_checkAeSimuStatus(); - //Check to see if the resource is present or not - if (ischosen(v_response.primitive.responsePrimitive.primitiveContent.uRI)){ - v_contentResponseRequestResource.request := mw_contentRequestBase; - v_requestResourceURI := v_response.primitive.responsePrimitive.primitiveContent.uRI; - v_contentResponseRequestResource.request.primitiveContent := p_requestPrimitive.primitiveContent; - if (p_operation == int1){ //create - v_statusCode := int2001; - v_primitiveContent := f_getTemplateFromPrimitiveContent(p_requestPrimitive.primitiveContent); - }else if (p_operation == int2){ //retrieve - v_statusCode := int2000; - v_primitiveContent.container := mw_contentContainer_rc1; - }else if (p_operation == int3){ //update - v_statusCode := int2004; - v_primitiveContent := f_getTemplateFromPrimitiveContent(p_requestPrimitive.primitiveContent); - }else if (p_operation == int4){ //delete - v_statusCode := int2002; - v_primitiveContent := omit; - } + //Check to see if the resource is present or not + if (ischosen(v_response.primitive.responsePrimitive.primitiveContent.uRI)){ + v_contentResponseRequestResource.request := mw_contentRequestBase; + v_requestResourceURI := v_response.primitive.responsePrimitive.primitiveContent.uRI; + v_contentResponseRequestResource.request.primitiveContent := p_requestPrimitive.primitiveContent; + if (p_operation == int1){ //create + v_statusCode := int2001; + v_primitiveContent := f_getTemplateFromPrimitiveContent(p_requestPrimitive.primitiveContent); + }else if (p_operation == int2){ //retrieve + v_statusCode := int2000; + v_primitiveContent.container := mw_contentContainer_rc1; + }else if (p_operation == int3){ //update + v_statusCode := int2004; + v_primitiveContent := f_getTemplateFromPrimitiveContent(p_requestPrimitive.primitiveContent); + }else if (p_operation == int4){ //delete + v_statusCode := int2002; + v_primitiveContent := omit; + } f_send(e_mcaPort, m_request(m_retrieve(v_requestResourceURI, f_getOriginator(v_aeIndex)))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, v_contentResponseRequestResource))) -> value v_response{ - setverdict(pass, testcasename() & ": Request resource has been received"); - v_requestStatus := v_response.primitive.responsePrimitive.primitiveContent.request.requestStatus; - if (v_requestStatus==int1){ //COMPLETED - tc_ac.stop; - if (valueof(p_requestPrimitive.requestIdentifier) == valueof(v_response.primitive.responsePrimitive.primitiveContent.request.operationResult.requestIdentifier) ){ - setverdict(pass, testcasename() & ": RequestStatus: COMPLETED and requestIdentifier attribute correctly received"); - }else{ - setverdict(fail, testcasename() & ": RequestStatus: COMPLETED and requestIdentifier attribute not correctly received"); - } + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, v_contentResponseRequestResource))) -> value v_response{ + setverdict(pass, testcasename() & ": Request resource has been received"); + v_requestStatus := v_response.primitive.responsePrimitive.primitiveContent.request.requestStatus; + if (v_requestStatus==int1){ //COMPLETED + tc_ac.stop; + if (valueof(p_requestPrimitive.requestIdentifier) == valueof(v_response.primitive.responsePrimitive.primitiveContent.request.operationResult.requestIdentifier) ){ + setverdict(pass, testcasename() & ": RequestStatus: COMPLETED and requestIdentifier attribute correctly received"); + }else{ + setverdict(fail, testcasename() & ": RequestStatus: COMPLETED and requestIdentifier attribute not correctly received"); + } - if (valueof(v_statusCode) == valueof(v_response.primitive.responsePrimitive.primitiveContent.request.operationResult.responseStatusCode) ){ - setverdict(pass, testcasename() & ": RequestStatus: COMPLETED and responseStatusCode attribute correctly received"); - }else{ - setverdict(fail, testcasename() & ": RequestStatus: COMPLETED and responseStatusCode attribute not correctly received"); - } + if (valueof(v_statusCode) == valueof(v_response.primitive.responsePrimitive.primitiveContent.request.operationResult.responseStatusCode) ){ + setverdict(pass, testcasename() & ": RequestStatus: COMPLETED and responseStatusCode attribute correctly received"); + }else{ + setverdict(fail, testcasename() & ": RequestStatus: COMPLETED and responseStatusCode attribute not correctly received"); + } - if (match(v_response.primitive.responsePrimitive.primitiveContent.request.operationResult.primitiveContent, v_primitiveContent) ){ - setverdict(pass, testcasename() & ": RequestStatus: COMPLETED and primitiveContent template correctly received"); - }else{ - setverdict(fail, testcasename() & ": RequestStatus: COMPLETED and primitiveContent template not correctly received"); - } + if (match(v_response.primitive.responsePrimitive.primitiveContent.request.operationResult.primitiveContent, v_primitiveContent) ){ + setverdict(pass, testcasename() & ": RequestStatus: COMPLETED and primitiveContent template correctly received"); + }else{ + setverdict(fail, testcasename() & ": RequestStatus: COMPLETED and primitiveContent template not correctly received"); + } - }else if (v_requestStatus==int2){ //FAILED - tc_ac.stop; - setverdict(fail, testcasename() & ": RequestStatus: FAIL"); - }else{ //PENDING, FORWARDING or PARTIALLY_COMPLETED - f_sleep(PX_TAC/5.0); + }else if (v_requestStatus==int2){ //FAILED + tc_ac.stop; + setverdict(fail, testcasename() & ": RequestStatus: FAIL"); + }else{ //PENDING, FORWARDING or PARTIALLY_COMPLETED + f_sleep(PX_TAC/5.0); f_send(e_mcaPort, m_request(m_retrieve(v_requestResourceURI, f_getOriginator(v_aeIndex)))); - repeat; + repeat; + } + } + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4004))) { + tc_ac.stop; + setverdict(fail, testcasename() & ": Request resource not found"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitive(?, -))) { + tc_ac.stop; + setverdict(fail, testcasename() & ": Wrong response status code in the response"); + } + [] tc_ac.timeout { + setverdict(fail, testcasename() & ": No answer while retrieving resource"); } } - [] mcaPort.receive(mw_response(mw_responsePrimitive(int4004))) { - tc_ac.stop; - setverdict(fail, testcasename() & ": Request resource not found"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitive(?, -))) { - tc_ac.stop; - setverdict(fail, testcasename() & ": Wrong response status code in the response"); - } - [] tc_ac.timeout { - setverdict(fail, testcasename() & ": No answer while retrieving resource"); - } - } - } + } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); }//end f_CSE_RT_NBS_003 - }//end Group Synchronous + }//end Group Synchronous - group Asynchronous{ + group Asynchronous{ function f_CSE_RT_NBA_001(template RequestPrimitive p_requestPrimitive, in template (omit) RequestPrimitive p_parentRequestPrimitive := omit) runs on AeSimu system CseSystem{ - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; - // Test control - if(PICS_NON_BLOCKING_REQUEST_ASYNCH){ - setverdict(inconc, __SCOPE__ & ": It is required to not support Non-blocking access resource in asynchronous mode to run this test case"); - stop; - } + // Test control + if(PICS_NON_BLOCKING_REQUEST_ASYNCH){ + setverdict(inconc, __SCOPE__ & ": It is required to not support Non-blocking access resource in asynchronous mode to run this test case"); + stop; + } - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble + // Preamble - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - if(ispresent(p_parentRequestPrimitive)) { - v_resourceIndex := f_cse_createResource(valueof(p_parentRequestPrimitive.resourceType), p_parentRequestPrimitive, v_aeIndex); - p_requestPrimitive.to_ := f_getResourceAddress(v_resourceIndex); - }else{ - p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); - } - p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); - p_requestPrimitive.responseType := {int2,omit}; //nonBlockingRequestAsynch - // Test Body + if(ispresent(p_parentRequestPrimitive)) { + v_resourceIndex := f_cse_createResource(valueof(p_parentRequestPrimitive.resourceType), p_parentRequestPrimitive, v_aeIndex); + p_requestPrimitive.to_ := f_getResourceAddress(v_resourceIndex); + }else{ + p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); + } + p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); + p_requestPrimitive.responseType := {int2,omit}; //nonBlockingRequestAsynch + // Test Body f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int1002, omit))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": No content provided with the right status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(omit))) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": No content provided with a wrong status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Content provided"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while executing a Non-blocking access resource in asynchronous mode operation"); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int1002, omit))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": No content provided with the right status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(omit))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": No content provided with a wrong status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Content provided"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while executing a Non-blocking access resource in asynchronous mode operation"); + } } - } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); }//end f_CSE_RT_NBA_001 function f_CSE_RT_NBA_002(template RequestPrimitive p_requestPrimitive, in template (omit) RequestPrimitive p_parentRequestPrimitive := omit) runs on AeSimu system CseSystem{ - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var template PrimitiveContent v_contentResponse; + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var template PrimitiveContent v_contentResponse; - // Test control - if(not PICS_NON_BLOCKING_REQUEST_SYNCH){ - setverdict(inconc, __SCOPE__ & ": It is required to support Non-blocking access resource in synchronous mode to run this test case"); - stop; - } + // Test control + if(not PICS_NON_BLOCKING_REQUEST_SYNCH){ + setverdict(inconc, __SCOPE__ & ": It is required to support Non-blocking access resource in synchronous mode to run this test case"); + stop; + } - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble + // Preamble - v_contentResponse.uRI := ?; + v_contentResponse.uRI := ?; - v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); + v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); - if(ispresent(p_parentRequestPrimitive)) { - v_resourceIndex := f_cse_createResource(valueof(p_parentRequestPrimitive.resourceType), p_parentRequestPrimitive, v_aeIndex); - p_requestPrimitive.to_ := f_getResourceAddress(v_resourceIndex); - }else{ - p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); - } - p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); - p_requestPrimitive.responseType := {int2,omit}; //nonBlockingRequestAsynch + if(ispresent(p_parentRequestPrimitive)) { + v_resourceIndex := f_cse_createResource(valueof(p_parentRequestPrimitive.resourceType), p_parentRequestPrimitive, v_aeIndex); + p_requestPrimitive.to_ := f_getResourceAddress(v_resourceIndex); + }else{ + p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); + } + p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); + p_requestPrimitive.responseType := {int2,omit}; //nonBlockingRequestAsynch - // Test Body + // Test Body f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int1002, v_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": URI attribute is set to <request> resource address"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitive(int1002))) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": URI attribute is not set to <request> resource address"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while executing a Non-blocking access resource in synchronous mode operation"); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int1002, v_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": URI attribute is set to <request> resource address"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitive(int1002))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": URI attribute is not set to <request> resource address"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while executing a Non-blocking access resource in synchronous mode operation"); + } } - } - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); }//end f_CSE_RT_NBA_002 function f_CSE_RT_NBA_003(template RequestPrimitive p_requestPrimitive, in template (omit) RequestPrimitive p_parentRequestPrimitive := omit, in ResponseStatusCode p_responseStatusCode) runs on AeSimu system CseSystem{ - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var template PrimitiveContent v_contentResponse; + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var template PrimitiveContent v_contentResponse; - // Test control - if(not PICS_NON_BLOCKING_REQUEST_SYNCH){ - setverdict(inconc, __SCOPE__ & ": It is required to support Non-blocking access resource in synchronous mode to run this test case"); - stop; - } + // Test control + if(not PICS_NON_BLOCKING_REQUEST_SYNCH){ + setverdict(inconc, __SCOPE__ & ": It is required to support Non-blocking access resource in synchronous mode to run this test case"); + stop; + } - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble + // Preamble - v_contentResponse.uRI := ?; + v_contentResponse.uRI := ?; v_aeIndex := f_cse_preamble_registerAe(-, {f_getLocalPoA(vc_aeSimuDesc.mcaPortIn, "")});//c_CRUDNDi); - if(ispresent(p_parentRequestPrimitive)) { - v_resourceIndex := f_cse_createResource(valueof(p_parentRequestPrimitive.resourceType), p_parentRequestPrimitive, v_aeIndex); - p_requestPrimitive.to_ := f_getResourceAddress(v_resourceIndex); - }else{ - p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); - } - p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); - p_requestPrimitive.responseType := {int2, omit}; //nonBlockingRequestAsynch and no notification target list is provided" + if(ispresent(p_parentRequestPrimitive)) { + v_resourceIndex := f_cse_createResource(valueof(p_parentRequestPrimitive.resourceType), p_parentRequestPrimitive, v_aeIndex); + p_requestPrimitive.to_ := f_getResourceAddress(v_resourceIndex); + }else{ + p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); + } + p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); + p_requestPrimitive.responseType := {int2, omit}; //nonBlockingRequestAsynch and no notification target list is provided" f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int1002, v_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": URI attribute is set to <request> resource address"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitive(int1002))) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": URI attribute is not set to <request> resource address"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while executing a Non-blocking access resource in synchronous mode operation"); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int1002, v_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": URI attribute is set to <request> resource address"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitive(int1002))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": URI attribute is not set to <request> resource address"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while executing a Non-blocking access resource in synchronous mode operation"); + } } - } - f_checkAeSimuStatus(); + f_checkAeSimuStatus(); - //Test Body + //Test Body - //Check to see if the notification is received - f_cse_notifyProcedure_responsePrimitiveHandler(mw_responsePrimitive(p_responseStatusCode)); + //Check to see if the notification is received + f_cse_notifyProcedure_responsePrimitiveHandler(mw_responsePrimitive(p_responseStatusCode)); - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); }//end f_CSE_RT_NBA_003 function f_CSE_RT_NBA_004(template RequestPrimitive p_requestPrimitive, in template (omit) RequestPrimitive p_parentRequestPrimitive := omit) runs on AeSimu system CseSystem{ - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex := -1; - var integer v_resourceIndex := -1; - var template PrimitiveContent v_contentResponse; + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex := -1; + var integer v_resourceIndex := -1; + var template PrimitiveContent v_contentResponse; - // Test control - if(not PICS_NON_BLOCKING_REQUEST_SYNCH){ - setverdict(inconc, __SCOPE__ & ": It is required to support Non-blocking access resource in synchronous mode to run this test case"); - stop; - } + // Test control + if(not PICS_NON_BLOCKING_REQUEST_SYNCH){ + setverdict(inconc, __SCOPE__ & ": It is required to support Non-blocking access resource in synchronous mode to run this test case"); + stop; + } - // Test component configuration - f_cf01Up(); + // Test component configuration + f_cf01Up(); - // Test adapter configuration + // Test adapter configuration - // Preamble + // Preamble - v_contentResponse.uRI := ?; + v_contentResponse.uRI := ?; v_aeIndex := f_cse_preamble_registerAe(-, {f_getLocalPoA(vc_aeSimuDesc.mcaPortIn, "")});//c_CRUDNDi); - if(ispresent(p_parentRequestPrimitive)) { - v_resourceIndex := f_cse_createResource(valueof(p_parentRequestPrimitive.resourceType), p_parentRequestPrimitive, v_aeIndex); - p_requestPrimitive.to_ := f_getResourceAddress(v_resourceIndex); - }else{ - p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); - } - p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); - p_requestPrimitive.responseType.responseTypeValue := int2; //nonBlockingRequestAsynch - p_requestPrimitive.responseType.notificationURI := {}; //"...an empty notification target list is provided" + if(ispresent(p_parentRequestPrimitive)) { + v_resourceIndex := f_cse_createResource(valueof(p_parentRequestPrimitive.resourceType), p_parentRequestPrimitive, v_aeIndex); + p_requestPrimitive.to_ := f_getResourceAddress(v_resourceIndex); + }else{ + p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); + } + p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); + p_requestPrimitive.responseType.responseTypeValue := int2; //nonBlockingRequestAsynch + p_requestPrimitive.responseType.notificationURI := {}; //"...an empty notification target list is provided" - // Test Body + // Test Body f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int1002, v_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": URI attribute is set to <request> resource address"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitive(int1002))) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": URI attribute is not set to <request> resource address"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while executing a Non-blocking access resource in synchronous mode operation"); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int1002, v_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": URI attribute is set to <request> resource address"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitive(int1002))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": URI attribute is not set to <request> resource address"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while executing a Non-blocking access resource in synchronous mode operation"); + } } - } - f_checkAeSimuStatus(); + f_checkAeSimuStatus(); - //Check if Notification is sent or not + //Check if Notification is sent or not - f_cse_notifyProcedure_noNotificationHandler(); + f_cse_notifyProcedure_noNotificationHandler(); - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); }//end f_CSE_RT_NBA_004 function f_CSE_RT_NBA_005(template RequestPrimitive p_requestPrimitive, in template (omit) RequestPrimitive p_parentRequestPrimitive := omit, in ResponseStatusCode p_responseStatusCode) runs on AeSimu system CseSystem{ - // Local variables - var MsgIn v_response; - var RequestPrimitive v_request; - var integer v_aeIndex, v_ae2Index := -1; - var integer v_resourceIndex := -1; - var template PrimitiveContent v_contentResponse; + // Local variables + var MsgIn v_response; + var RequestPrimitive v_request; + var integer v_aeIndex, v_ae2Index := -1; + var integer v_resourceIndex := -1; + var template PrimitiveContent v_contentResponse; - // Test control - if(not PICS_NON_BLOCKING_REQUEST_SYNCH){ - setverdict(inconc, __SCOPE__ & ": It is required to support Non-blocking access resource in synchronous mode to run this test case"); - stop; - } + // Test control + if(not PICS_NON_BLOCKING_REQUEST_SYNCH){ + setverdict(inconc, __SCOPE__ & ": It is required to support Non-blocking access resource in synchronous mode to run this test case"); + stop; + } - // Test component configuration - f_cf01Up(true); + // Test component configuration + f_cf01Up(true); - // Test adapter configuration + // Test adapter configuration - // Preamble + // Preamble - v_contentResponse.uRI := ?; + v_contentResponse.uRI := ?; v_aeIndex := f_cse_preamble_registerAe(-, {f_getLocalPoA(vc_aeSimuDesc.mcaPortIn, "")});//c_CRUDNDi); - f_checkAeSimuStatus(); + f_checkAeSimuStatus(); vc_ae2.start(f_cse_createResource(int2, m_createAe(PX_TS_AE2.appId, -, PX_TS_AE2.aeIdStem, c_defaultAe2ResourceName, {f_getLocalPoA(PX_TS_AE2.mcaPortIn, "")}))); // AE2 is registred - f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); - v_ae2Index := f_getResourceFromAeSimu(vc_ae2); + v_ae2Index := f_getResourceFromAeSimu(vc_ae2); - if(ispresent(p_parentRequestPrimitive)) { - v_resourceIndex := f_cse_createResource(valueof(p_parentRequestPrimitive.resourceType), p_parentRequestPrimitive, v_aeIndex); - p_requestPrimitive.to_ := f_getResourceAddress(v_resourceIndex); - }else{ - p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); - } - p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); - p_requestPrimitive.responseType.responseTypeValue := int2; //nonBlockingRequestAsynch - p_requestPrimitive.responseType.notificationURI := {f_getResourceAddress(v_aeIndex), f_getResourceAddress(v_ae2Index)}; //"...an empty notification target list is provided" + if(ispresent(p_parentRequestPrimitive)) { + v_resourceIndex := f_cse_createResource(valueof(p_parentRequestPrimitive.resourceType), p_parentRequestPrimitive, v_aeIndex); + p_requestPrimitive.to_ := f_getResourceAddress(v_resourceIndex); + }else{ + p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex); + } + p_requestPrimitive.from_ := f_getOriginator(v_aeIndex); + p_requestPrimitive.responseType.responseTypeValue := int2; //nonBlockingRequestAsynch + p_requestPrimitive.responseType.notificationURI := {f_getResourceAddress(v_aeIndex), f_getResourceAddress(v_ae2Index)}; //"...an empty notification target list is provided" - // Test Body + // Test Body f_send(e_mcaPort, m_request(valueof(p_requestPrimitive))); - tc_ac.start; - alt { - [] mcaPort.receive(mw_response(mw_responsePrimitive(int1002, v_contentResponse))) -> value v_response { - tc_ac.stop; - setverdict(pass, __SCOPE__ & ": URI attribute is set to <request> resource address"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitive(int1002))) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": URI attribute is not set to <request> resource address"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { - tc_ac.stop; - setverdict(fail, __SCOPE__ & ": Wrong response status code"); - } - [] tc_ac.timeout { - setverdict(fail, __SCOPE__ & ": No answer while executing a Non-blocking access resource in synchronous mode operation"); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int1002, v_contentResponse))) -> value v_response { + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": URI attribute is set to <request> resource address"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitive(int1002))) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": URI attribute is not set to <request> resource address"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while executing a Non-blocking access resource in synchronous mode operation"); + } } - } - f_checkAeSimuStatus(); + f_checkAeSimuStatus(); - //Check if Notification is sent or not + //Check if Notification is sent or not - vc_ae2.start(f_cse_notifyProcedure_responsePrimitiveHandler(mw_responsePrimitive(p_responseStatusCode))); + vc_ae2.start(f_cse_notifyProcedure_responsePrimitiveHandler(mw_responsePrimitive(p_responseStatusCode))); - f_cse_notifyProcedure_responsePrimitiveHandler(mw_responsePrimitive(p_responseStatusCode)); + f_cse_notifyProcedure_responsePrimitiveHandler(mw_responsePrimitive(p_responseStatusCode)); f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); - // Postamble - f_cse_postamble_deleteResources(); + // Postamble + f_cse_postamble_deleteResources(); - // Tear down - f_cf01Down(); + // Tear down + f_cf01Down(); }//end f_CSE_RT_NBA_005 - }//end Group Asynchronous + }//end Group Asynchronous - }//end group Non_Blocking_Requests + }//end group Non_Blocking_Requests }//end of group Response_Type diff --git a/OneM2M_Testcases_CSE_Release_4.ttcn b/OneM2M_Testcases_CSE_Release_4.ttcn index e4b6adf9592efbbc612d7df6bbced7a2952b1456..db64fcf11e9e1b11474aba25d449fb00a55fe2e5 100644 --- a/OneM2M_Testcases_CSE_Release_4.ttcn +++ b/OneM2M_Testcases_CSE_Release_4.ttcn @@ -558,7 +558,689 @@ module OneM2M_Testcases_CSE_Release_4 { }//end group Create - group Notify{ + group Notify{ + + group g_CSE_SUB_NTF_012 { + + /** + * @desc Check that the IUT successfully sends a cross-resource notification to the notificationURI when notifications from resources in regularResourcesAsTarget are received within required TIME_LIMIT window if timeWindowType is set to TIME_WINDOW_TYPE + * + */ + testcase TC_CSE_SUB_NTF_012_TWT_1() runs on Tester system CseSystem { + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_SUB_NTF_012(int1)); + + v_ae1.done; + + } + + testcase TC_CSE_SUB_NTF_012_TWT_2() runs on Tester system CseSystem { + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_SUB_NTF_012(int2)); + + v_ae1.done; + + } + + }//end group g_CSE_SUB_NTF_012 + + group g_CSE_SUB_NTF_013 { + + /** + * @desc Check that the IUT does not send a cross-resource notification to the notificationURI when a notification from resource in regularResourcesAsTarget is not received within required TIME_LIMIT window if timeWindowType is set to TIME_WINDOW_TYPE + * + */ + testcase TC_CSE_SUB_NTF_013_TWT_1() runs on Tester system CseSystem { + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_SUB_NTF_013(int1)); + + v_ae1.done; + + } + + testcase TC_CSE_SUB_NTF_013_TWT_2() runs on Tester system CseSystem { + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_SUB_NTF_013(int2)); + + v_ae1.done; + + } + + }//end group g_CSE_SUB_NTF_013 + + group g_CSE_SUB_NTF_014 { + + /** + * @desc Check that the IUT does not send a cross-resource notification to the notificationURI when notifications from resources in regularResourcesAsTarget are received within required TIME_LIMIT window if timeWindowType is set to TIME_WINDOW_TYPE but NOTIFICATION_EVENT_TYPE does not match for any target resource + * + */ + testcase TC_CSE_SUB_NTF_014_TWT_1() runs on Tester system CseSystem { + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_SUB_NTF_014(int1)); + + v_ae1.done; + + } + + testcase TC_CSE_SUB_NTF_014_TWT_2() runs on Tester system CseSystem { + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_SUB_NTF_014(int2)); + + v_ae1.done; + + } + + }//end group g_CSE_SUB_NTF_014 + + group g_CSE_SUB_NTF_015 { + + /** + * @desc Check that the IUT successfully sends a cross-resource notification to the notificationURI when notifications from resources in subscriptionResourcesAsTarget are received within required TIME_LIMIT window if timeWindowType is set to TIME_WINDOW_TYPE + * + */ + testcase TC_CSE_SUB_NTF_015_TWT_1() runs on Tester system CseSystem { + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_SUB_NTF_015(int1)); + + v_ae1.done; + + } + + testcase TC_CSE_SUB_NTF_015_TWT_2() runs on Tester system CseSystem { + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_SUB_NTF_015(int2)); + + v_ae1.done; + + } + + }//end group g_CSE_SUB_NTF_015 + + group g_CSE_SUB_NTF_016 { + + /** + * @desc Check that the IUT successfully sends a cross-resource notification to the notificationURI when notifications from resources in subscriptionResourcesAsTarget are received within required TIME_LIMIT window if timeWindowType is set to TIME_WINDOW_TYPE + * + */ + testcase TC_CSE_SUB_NTF_016_TWT_1() runs on Tester system CseSystem { + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_SUB_NTF_016(int1)); + + v_ae1.done; + + } + + testcase TC_CSE_SUB_NTF_016_TWT_2() runs on Tester system CseSystem { + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_SUB_NTF_016(int2)); + + v_ae1.done; + + } + + }//end group g_CSE_SUB_NTF_016 + + /** @desc Check that the IUT successfully sends notification request to the notificationURI when an update request is received for the target subscribed-to resource with notificationEventType set to "Blocking_Update" + * + */ + testcase TC_CSE_SUB_NTF_017() runs on Tester system CseSystem { + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_SUB_NTF_017()); + + v_ae1.done; + + } + + function f_CSE_SUB_NTF_017() runs on AeSimu system CseSystem { + // Local variables + var integer v_aeIndex_1 := -1; + var integer v_aeIndex_2 := -1; + var integer v_resourceIndex := -1; + var integer v_childResourceIndex := -1; + var template RequestPrimitive v_createRequest := m_createContainerBase; + const ResourceType c_containerResourceType := int3; + var template RequestPrimitive v_updateRequest := m_updateContainerBase; + var Labels v_labels_1:= {"VALUE_1"}; + var Labels v_labels_2:= {"VALUE_2"}; + var template PrimitiveContent v_contentNotification := {container := mw_contentContainerBase};// all attributes expected + + + // Test control + + // Test component configuration + f_cf01Up(true); + + // Test adapter configuration + + // Preamble + v_aeIndex_1 := f_cse_preamble_registerAe();//c_CRUDNDi); + v_createRequest.primitiveContent.container.labels := v_labels_1; + v_resourceIndex := f_cse_createResource(c_containerResourceType, v_createRequest, v_aeIndex_1);//Container + + v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_resourceIndex), -, {f_getResourceAddress(v_aeIndex_2)}, m_eventNotificationCriteria({int7}), -, omit, omit, omit, -, omit); //Blocking_update(7) + + f_cse_preamble_subscriptionVerification(v_aeIndex_2, v_createRequest, int23);//AE2 registration + + v_childResourceIndex := f_cse_createResource(int23, v_createRequest, v_resourceIndex);//Subscription child + + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + + if(vc_ae2.running) { + vc_ae2.stop; + }; + + // Test Body + vc_ae2.start(f_cse_notifyProcedure_representationHandler(v_contentNotification));//Check notification + + v_updateRequest.filterCriteria.labels := v_labels_1; + v_updateRequest.primitiveContent.container.labels := v_labels_2; + f_cse_sendUpdateRequestPrimitive(int3, v_updateRequest, v_resourceIndex); // Update request + + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + + //Postamble + f_cse_postamble_deleteResources(); + + //Tear down + f_cf01Down(); + + } // end TC_CSE_SUB_NTF_017 + + /** @desc Check that the IUT successfully sends notification request to the notificationURI when an update request is received for the target subscribed-to resource with notificationEventType set to "Blocking_Update" when the attribute condition tag matches the modified attributes + * + */ + testcase TC_CSE_SUB_NTF_018() runs on Tester system CseSystem { + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_SUB_NTF_018()); + + v_ae1.done; + + } + + function f_CSE_SUB_NTF_018() runs on AeSimu system CseSystem { + // Local variables + var integer v_aeIndex_1 := -1; + var integer v_aeIndex_2 := -1; + var integer v_resourceIndex := -1; + var integer v_childResourceIndex := -1; + var template RequestPrimitive v_createRequest := m_createContainerBase; + const ResourceType c_containerResourceType := int3; + var template RequestPrimitive v_updateRequest := m_updateContainerBase; + var Labels v_labels_1:= {"VALUE_1"}; + var Labels v_labels_2:= {"VALUE_2"}; + const AttributeList c_optionalAttribute := {"labels"}; + var template PrimitiveContent v_contentNotification := {container := mw_contentContainerBase};// all attributes expected + + + // Test control + + // Test component configuration + f_cf01Up(true); + + // Test adapter configuration + + // Preamble + v_aeIndex_1 := f_cse_preamble_registerAe();//c_CRUDNDi); + v_createRequest.primitiveContent.container.labels := v_labels_1; + v_resourceIndex := f_cse_createResource(c_containerResourceType, v_createRequest, v_aeIndex_1);//Container + + v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_resourceIndex), -, {f_getResourceAddress(v_aeIndex_2)}, m_eventNotificationCriteria({int7}, c_optionalAttribute), -, omit, omit, omit, -, omit); //Blocking_update(7) + + f_cse_preamble_subscriptionVerification(v_aeIndex_2, v_createRequest, int23);//AE2 registration + + v_childResourceIndex := f_cse_createResource(int23, v_createRequest, v_resourceIndex);//Subscription child + + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + + if(vc_ae2.running) { + vc_ae2.stop; + }; + + // Test Body + vc_ae2.start(f_cse_notifyProcedure_representationHandler(v_contentNotification));//Check notification + + v_updateRequest.filterCriteria.labels := v_labels_1; + v_updateRequest.primitiveContent.container.labels := v_labels_2; + f_cse_sendUpdateRequestPrimitive(int3, v_updateRequest, v_resourceIndex); // Update request + + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + + //Postamble + f_cse_postamble_deleteResources(); + + //Tear down + f_cf01Down(); + + } // end TC_CSE_SUB_NTF_018 + + /** @desc Check that the IUT does not send notification request to the notificationURI when an update request is received for the target subscribed-to resource with notificationEventType set to "Blocking_Update" but the attribute condition tag does not match the modified attributes + * + */ + testcase TC_CSE_SUB_NTF_019() runs on Tester system CseSystem { + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_SUB_NTF_019()); + + v_ae1.done; + + } + + function f_CSE_SUB_NTF_019() runs on AeSimu system CseSystem { + // Local variables + var integer v_aeIndex_1 := -1; + var integer v_aeIndex_2 := -1; + var integer v_resourceIndex := -1; + var integer v_childResourceIndex := -1; + var template RequestPrimitive v_createRequest := m_createContainerBase; + const ResourceType c_containerResourceType := int3; + var template RequestPrimitive v_updateRequest := m_updateContainerBase; + var Labels v_labels_1:= {"VALUE_1"}; + var Labels v_labels_2:= {"VALUE_2"}; + const AttributeList c_optionalAttribute_1 := {"labels"}; + const AttributeList c_optionalAttribute_2 := {"maxByteSize"}; + var template PrimitiveContent v_contentNotification := {container := mw_contentContainerBase};// all attributes expected + + + // Test control + + // Test component configuration + f_cf01Up(true); + + // Test adapter configuration + + // Preamble + v_aeIndex_1 := f_cse_preamble_registerAe();//c_CRUDNDi); + v_createRequest.primitiveContent.container.labels := v_labels_1; + v_resourceIndex := f_cse_createResource(c_containerResourceType, v_createRequest, v_aeIndex_1);//Container + + v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_resourceIndex), -, {f_getResourceAddress(v_aeIndex_2)}, m_eventNotificationCriteria({int7}, c_optionalAttribute_2), -, omit, omit, omit, -, omit); //Blocking_update(7) + + f_cse_preamble_subscriptionVerification(v_aeIndex_2, v_createRequest, int23);//AE2 registration + + v_childResourceIndex := f_cse_createResource(int23, v_createRequest, v_resourceIndex);//Subscription child + + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + + if(vc_ae2.running) { + vc_ae2.stop; + }; + + // Test Body + vc_ae2.start(f_cse_notifyProcedure_noNotificationHandler());//Check no notification + + v_updateRequest.filterCriteria.labels := v_labels_1; + v_updateRequest.primitiveContent.container.labels := v_labels_2; + f_cse_sendUpdateRequestPrimitive(int3, v_updateRequest, v_resourceIndex); // Update request + + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + + //Postamble + f_cse_postamble_deleteResources(); + + //Tear down + f_cf01Down(); + + } // end TC_CSE_SUB_NTF_019 + + /** @desc Check that the IUT blocks update request for the target subscribed-to resource when an previous update request is received with notificationEventType set to "Blocking_Update" and notification process is still not completed + * + */ + testcase TC_CSE_SUB_NTF_020() runs on Tester system CseSystem { + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_SUB_NTF_020()); + + v_ae1.done; + + } + + function f_CSE_SUB_NTF_020() runs on AeSimu system CseSystem { + // Local variables + var integer v_aeIndex_1 := -1; + var integer v_aeIndex_2 := -1; + var integer v_resourceIndex := -1; + var integer v_childResourceIndex := -1; + var template RequestPrimitive v_createRequest := m_createContainerBase; + var RequestPrimitive v_request; + const ResourceType c_containerResourceType := int3; + var template RequestPrimitive v_updateRequest := m_updateContainerBase; + var Labels v_labels_1:= {"VALUE_1"}; + var Labels v_labels_2:= {"VALUE_2"}; + var template PrimitiveContent v_contentNotification := {container := mw_contentContainerBase};// all attributes expected + + + // Test control + + // Test component configuration + f_cf01Up(true); + + // Test adapter configuration + + // Preamble + v_aeIndex_1 := f_cse_preamble_registerAe();//c_CRUDNDi); + v_createRequest.primitiveContent.container.labels := v_labels_1; + v_resourceIndex := f_cse_createResource(c_containerResourceType, v_createRequest, v_aeIndex_1);//Container + + v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_resourceIndex), -, {f_getResourceAddress(v_aeIndex_2)}, m_eventNotificationCriteria({int7}), -, omit, omit, omit, -, omit); //Blocking_update(7) + + f_cse_preamble_subscriptionVerification(v_aeIndex_2, v_createRequest, int23);//AE2 registration + + v_childResourceIndex := f_cse_createResource(int23, v_createRequest, v_resourceIndex);//Subscription child + + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + + if(vc_ae2.running) { + vc_ae2.stop; + }; + + // Test Body + + v_updateRequest.filterCriteria.labels := v_labels_1; + v_updateRequest.primitiveContent.container.labels := v_labels_2; + f_cse_sendUpdateRequestPrimitive(int3, v_updateRequest, v_resourceIndex); // Update request 1 must be incomplete + + v_request:= f_getUpdateRequestPrimitive(int3, v_resourceIndex, v_updateRequest); // Update request 2 + + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Update operation not blocked"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while updating resource type int3 (Container)"); + } + [] tc_ac.timeout { + setverdict(pass, __SCOPE__ & ": No answer while updating resource type int3 (Container)"); // No answer while previous update request is incomplete + } + } + + //Postamble + f_cse_postamble_deleteResources(); + + //Tear down + f_cf01Down(); + + } // end TC_CSE_SUB_NTF_020 + + /** @desc Check that the IUT successfully performs update request to the target subscribed-to resource with notificationEventType set to "Blocking_Update" + * + */ + testcase TC_CSE_SUB_NTF_021() runs on Tester system CseSystem { + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_SUB_NTF_021()); + + v_ae1.done; + + } + + function f_CSE_SUB_NTF_021() runs on AeSimu system CseSystem { + // Local variables + var integer v_aeIndex_1 := -1; + var integer v_aeIndex_2 := -1; + var integer v_resourceIndex := -1; + var integer v_childResourceIndex := -1; + var template RequestPrimitive v_createRequest := m_createContainerBase; + const ResourceType c_containerResourceType := int3; + var template RequestPrimitive v_updateRequest := m_updateContainerBase; + var Labels v_labels_1:= {"VALUE_1"}; + var Labels v_labels_2:= {"VALUE_2"}; + var template PrimitiveContent v_contentNotification := {container := mw_contentContainerBase};// all attributes expected + + + // Test control + + // Test component configuration + f_cf01Up(true); + + // Test adapter configuration + + // Preamble + v_aeIndex_1 := f_cse_preamble_registerAe();//c_CRUDNDi); + v_createRequest.primitiveContent.container.labels := v_labels_1; + v_resourceIndex := f_cse_createResource(c_containerResourceType, v_createRequest, v_aeIndex_1);//Container + + v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_resourceIndex), -, {f_getResourceAddress(v_aeIndex_2)}, m_eventNotificationCriteria({int7}), -, omit, omit, omit, -, omit); //Blocking_update(7) + + f_cse_preamble_subscriptionVerification(v_aeIndex_2, v_createRequest, int23);//AE2 registration + + v_childResourceIndex := f_cse_createResource(int23, v_createRequest, v_resourceIndex);//Subscription child + + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + + if(vc_ae2.running) { + vc_ae2.stop; + }; + + // Test Body + vc_ae2.start(f_cse_notifyProcedure_representationHandler(v_contentNotification));//Check notification + + v_updateRequest.filterCriteria.labels := v_labels_1; + v_updateRequest.primitiveContent.container.labels := v_labels_2; + f_cse_updateResource(int3, v_resourceIndex, v_updateRequest); // Update request + + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + + //Postamble + f_cse_postamble_deleteResources(); + + //Tear down + f_cf01Down(); + + } // end TC_CSE_SUB_NTF_021 + + /** @desc Check that the IUT rejects update request to the target subscribed-to resource when notificationEventType is set to "Blocking_Update" and the IUT have received the Notify response containing Response Status Code indicating TARGET_NOT_REACHABLE + * + */ + testcase TC_CSE_SUB_NTF_022() runs on Tester system CseSystem { + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_SUB_NTF_022()); + + v_ae1.done; + + } + + function f_CSE_SUB_NTF_022() runs on AeSimu system CseSystem { + // Local variables + var integer v_aeIndex_1 := -1; + var integer v_aeIndex_2 := -1; + var integer v_resourceIndex := -1; + var integer v_childResourceIndex := -1; + var template RequestPrimitive v_createRequest := m_createContainerBase; + var RequestPrimitive v_request; + const ResourceType c_containerResourceType := int3; + var template RequestPrimitive v_updateRequest := m_updateContainerBase; + var Labels v_labels_1:= {"VALUE_1"}; + var Labels v_labels_2:= {"VALUE_2"}; + var template PrimitiveContent v_contentNotification := {container := mw_contentContainerBase};// all attributes expected + + + // Test control + + // Test component configuration + f_cf01Up(true); + + // Test adapter configuration + + // Preamble + v_aeIndex_1 := f_cse_preamble_registerAe();//c_CRUDNDi); + v_createRequest.primitiveContent.container.labels := v_labels_1; + v_resourceIndex := f_cse_createResource(c_containerResourceType, v_createRequest, v_aeIndex_1);//Container + + v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_resourceIndex), -, {f_getResourceAddress(v_aeIndex_2)}, m_eventNotificationCriteria({int7}), -, omit, omit, omit, -, omit); //Blocking_update(7) + + f_cse_preamble_subscriptionVerification(v_aeIndex_2, v_createRequest, int23);//AE2 registration + + v_childResourceIndex := f_cse_createResource(int23, v_createRequest, v_resourceIndex);//Subscription child + + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + + if(vc_ae2.running) { + vc_ae2.stop; + }; + + // Test Body + vc_ae2.start(f_cse_notifyProcedure_subscriptionVerificationHandler(int5103));//Check notification TARGET_NOT_REACHABLE(5103) + + v_updateRequest.filterCriteria.labels := v_labels_1; + v_updateRequest.primitiveContent.container.labels := v_labels_2; + v_request:= f_getUpdateRequestPrimitive(int3, v_resourceIndex, v_updateRequest); + + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int5107))) -> value vc_response { //REMOTE_ENTITY_NOT_REACHABLE(5107) + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Update operation properly rejected"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while updating resource type int3 (Container)"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while updating resource type int3 (Container)"); + } + } + + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + + //Postamble + f_cse_postamble_deleteResources(); + + //Tear down + f_cf01Down(); + + } // end TC_CSE_SUB_NTF_022 + + /** @desc Check that the IUT rejects update request to the target subscribed-to resource when notificationEventType is set to "Blocking_Update" and the IUT have received the Notify response containing Response Status Code indicating OPERATION_NOT_ALLOWED + * + */ + testcase TC_CSE_SUB_NTF_023() runs on Tester system CseSystem { + + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_SUB_NTF_023()); + + v_ae1.done; + + } + + function f_CSE_SUB_NTF_023() runs on AeSimu system CseSystem { + // Local variables + var integer v_aeIndex_1 := -1; + var integer v_aeIndex_2 := -1; + var integer v_resourceIndex := -1; + var integer v_childResourceIndex := -1; + var template RequestPrimitive v_createRequest := m_createContainerBase; + var RequestPrimitive v_request; + const ResourceType c_containerResourceType := int3; + var template RequestPrimitive v_updateRequest := m_updateContainerBase; + var Labels v_labels_1:= {"VALUE_1"}; + var Labels v_labels_2:= {"VALUE_2"}; + var template PrimitiveContent v_contentNotification := {container := mw_contentContainerBase};// all attributes expected + + + // Test control + + // Test component configuration + f_cf01Up(true); + + // Test adapter configuration + + // Preamble + v_aeIndex_1 := f_cse_preamble_registerAe();//c_CRUDNDi); + v_createRequest.primitiveContent.container.labels := v_labels_1; + v_resourceIndex := f_cse_createResource(c_containerResourceType, v_createRequest, v_aeIndex_1);//Container + + v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_resourceIndex), -, {f_getResourceAddress(v_aeIndex_2)}, m_eventNotificationCriteria({int7}), -, omit, omit, omit, -, omit); //Blocking_update(7) + + f_cse_preamble_subscriptionVerification(v_aeIndex_2, v_createRequest, int23);//AE2 registration + + v_childResourceIndex := f_cse_createResource(int23, v_createRequest, v_resourceIndex);//Subscription child + + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + + if(vc_ae2.running) { + vc_ae2.stop; + }; + + // Test Body + vc_ae2.start(f_cse_notifyProcedure_subscriptionVerificationHandler(int4005));//Check notification OPERATION_NOT_ALLOWED(4005) + + v_updateRequest.filterCriteria.labels := v_labels_1; + v_updateRequest.primitiveContent.container.labels := v_labels_2; + v_request:= f_getUpdateRequestPrimitive(int3, v_resourceIndex, v_updateRequest); + + f_send(e_mcaPort, m_request(v_request)); + tc_ac.start; + alt { + [] mcaPort.receive(mw_response(mw_responsePrimitive(int4127))) -> value vc_response { //OPERATION_DENIED_BY_REMOTE_ENTITY(4127) + tc_ac.stop; + setverdict(pass, __SCOPE__ & ": Update operation properly rejected"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Wrong response status code"); + } + [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response { + tc_ac.stop; + setverdict(fail, __SCOPE__ & ": Error while updating resource type int3 (Container)"); + } + [] tc_ac.timeout { + setverdict(fail, __SCOPE__ & ": No answer while updating resource type int3 (Container)"); + } + } + + f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2); + + //Postamble + f_cse_postamble_deleteResources(); + + //Tear down + f_cf01Down(); + + } // end TC_CSE_SUB_NTF_023 + }//end group Notify @@ -637,6 +1319,789 @@ module OneM2M_Testcases_CSE_Release_4 { }// end group Semantic + group Discovery { + + group Basic_Operations{ + + group g_CSE_DIS_012 { + + /** + * @desc Check that the IUT successfully performs a Discovery-based OPERATION + * + */ + testcase TC_CSE_DIS_012_CRE() runs on Tester system CseSystem { //Create + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DIS_012(m_createContainerBase, int2001)); + v_ae1.done; + }//end TC_CSE_DIS_012_CRE + + testcase TC_CSE_DIS_012_UPD() runs on Tester system CseSystem { //Update + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + var template RequestPrimitive v_updateRequest := m_updateContainerBase; + var Labels v_labels_1:= {"VALUE_1"}; + v_updateRequest.primitiveContent.container.labels := v_labels_1; + v_ae1.start(f_CSE_DIS_012(v_updateRequest, int2004)); + v_ae1.done; + }//end TC_CSE_DIS_012_UPD + + testcase TC_CSE_DIS_012_DEL() runs on Tester system CseSystem { //Delete + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DIS_012(m_delete("Temporary", "Temporary"), int2002)); + v_ae1.done; + }//end TC_CSE_DIS_012_DEL + + }//end group g_CSE_DIS_012 + + group g_CSE_DIS_013 { + + /** + * @desc Check that the IUT successfully performs a Discovery-based OPERATION when the filter criteria is provided in the request + * + */ + testcase TC_CSE_DIS_013_CRE() runs on Tester system CseSystem { //Create + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DIS_013(m_createContainerBase, int2001)); + v_ae1.done; + }//end TC_CSE_DIS_013_CRE + + testcase TC_CSE_DIS_013_UPD() runs on Tester system CseSystem { //Update + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + var template RequestPrimitive v_updateRequest := m_updateContainerBase; + var Labels v_labels_1:= {"VALUE_2"}; + v_updateRequest.primitiveContent.container.labels := v_labels_1; + v_ae1.start(f_CSE_DIS_013(v_updateRequest, int2004)); + v_ae1.done; + }//end TC_CSE_DIS_013_UPD + + testcase TC_CSE_DIS_013_DEL() runs on Tester system CseSystem { //Delete + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DIS_013(m_delete("Temporary", "Temporary"), int2002)); + v_ae1.done; + }//end TC_CSE_DIS_013_DEL + + }//end group g_CSE_DIS_013 + + group g_CSE_DIS_014 { + + /** + * @desc Check that the IUT returns the empty content when no result matching with filter criteria is discovered in a Discovery-based OPERATION + * + */ + testcase TC_CSE_DIS_014_CRE() runs on Tester system CseSystem { //Create + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DIS_014(m_createContainerBase)); + v_ae1.done; + }//end TC_CSE_DIS_014_CRE + + testcase TC_CSE_DIS_014_UPD() runs on Tester system CseSystem { //Update + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + var template RequestPrimitive v_updateRequest := m_updateContainerBase; + var Labels v_labels_1:= {"VALUE_1"}; + v_updateRequest.primitiveContent.container.labels := v_labels_1; + v_ae1.start(f_CSE_DIS_014(v_updateRequest)); + v_ae1.done; + }//end TC_CSE_DIS_014_UPD + + testcase TC_CSE_DIS_014_DEL() runs on Tester system CseSystem { //Delete + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DIS_014(m_delete("Temporary", "Temporary"))); + v_ae1.done; + }//end TC_CSE_DIS_014_DEL + + }//end group g_CSE_DIS_014 + + group g_CSE_DIS_015 { + + /** + * @desc Check that the IUT successfully performs a Discovery-based OPERATION using Non-hierarchical addressing form when the Result Content and Desired Identifier Result Type is provided in the request + * + */ + testcase TC_CSE_DIS_015_CRE() runs on Tester system CseSystem { //Create + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DIS_015(m_createContainerBase)); + v_ae1.done; + }//end TC_CSE_DIS_015_CRE + + testcase TC_CSE_DIS_015_UPD() runs on Tester system CseSystem { //Update + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + var template RequestPrimitive v_updateRequest := m_updateContainerBase; + var Labels v_labels_1:= {"VALUE_1"}; + v_updateRequest.primitiveContent.container.labels := v_labels_1; + v_ae1.start(f_CSE_DIS_015(v_updateRequest)); + v_ae1.done; + }//end TC_CSE_DIS_015_UPD + + testcase TC_CSE_DIS_015_DEL() runs on Tester system CseSystem { //Delete + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DIS_015(m_delete("Temporary", "Temporary"))); + v_ae1.done; + }//end TC_CSE_DIS_015_DEL + + }//end group g_CSE_DIS_015 + + group g_CSE_DIS_016 { + + /** + * @desc Check that the IUT accepts a Discovery-based OPERATION request to the resource TARGET_RESOURCE_ADDRESS when AE has no privilege to perform the discovery operation + * + */ + testcase TC_CSE_DIS_016_CRE() runs on Tester system CseSystem { //Create + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DIS_016(m_createContainerBase)); + v_ae1.done; + }//end TC_CSE_DIS_016_CRE + + testcase TC_CSE_DIS_016_UPD() runs on Tester system CseSystem { //Update + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + var template RequestPrimitive v_updateRequest := m_updateContainerBase; + var Labels v_labels_1:= {"VALUE_1"}; + v_updateRequest.primitiveContent.container.labels := v_labels_1; + v_ae1.start(f_CSE_DIS_016(v_updateRequest)); + v_ae1.done; + }//end TC_CSE_DIS_016_UPD + + testcase TC_CSE_DIS_016_DEL() runs on Tester system CseSystem { //Delete + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DIS_016(m_delete("Temporary", "Temporary"))); + v_ae1.done; + }//end TC_CSE_DIS_016_DEL + + }//end group g_CSE_DIS_016 + + group g_CSE_DIS_017 { + + /** + * @desc Check that the IUT accepts a Discovery-based OPERATION request to the resource TARGET_RESOURCE_ADDRESS when AE has privilege to perform the discovery operation but AE has no privilege to perform the OPERATION request + * + */ + testcase TC_CSE_DIS_017_CRE() runs on Tester system CseSystem { //Create + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DIS_017(m_createContainerBase)); + v_ae1.done; + }//end TC_CSE_DIS_017_CRE + + testcase TC_CSE_DIS_017_UPD() runs on Tester system CseSystem { //Update + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + var template RequestPrimitive v_updateRequest := m_updateContainerBase; + var Labels v_labels_1:= {"VALUE_1"}; + v_updateRequest.primitiveContent.container.labels := v_labels_1; + v_ae1.start(f_CSE_DIS_017(v_updateRequest)); + v_ae1.done; + }//end TC_CSE_DIS_017_UPD + + testcase TC_CSE_DIS_017_DEL() runs on Tester system CseSystem { //Delete + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DIS_017(m_delete("Temporary", "Temporary"))); + v_ae1.done; + }//end TC_CSE_DIS_017_DEL + + }//end group g_CSE_DIS_017 + + group g_CSE_DIS_018 { + + /** + * @desc Check that the IUT responds with an error when the AE sends Discovery-based OPERATION requests to the resource TARGET_RESOURCE_ADDRESS which does not exist in the Hosting CSE + * + */ + testcase TC_CSE_DIS_018_CRE() runs on Tester system CseSystem { //Create + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DIS_018(m_createContainerBase)); + v_ae1.done; + }//end TC_CSE_DIS_018_CRE + + testcase TC_CSE_DIS_018_UPD() runs on Tester system CseSystem { //Update + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + var template RequestPrimitive v_updateRequest := m_updateContainerBase; + var Labels v_labels_1:= {"VALUE_1"}; + v_updateRequest.primitiveContent.container.labels := v_labels_1; + v_ae1.start(f_CSE_DIS_018(v_updateRequest)); + v_ae1.done; + }//end TC_CSE_DIS_018_UPD + + testcase TC_CSE_DIS_018_DEL() runs on Tester system CseSystem { //Delete + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DIS_018(m_delete("Temporary", "Temporary"))); + v_ae1.done; + }//end TC_CSE_DIS_018_DEL + + }//end group g_CSE_DIS_018 + + group g_CSE_DIS_019 { + + /** + * @desc Check that the IUT responds to the originator with an error when the originator sends a Discovery-based OPERATION request including an invalid format of filter criteria to discover the resource TARGET_RESOURCE_ADDRESS + * + */ + testcase TC_CSE_DIS_019_CRE() runs on Tester system CseSystem { //Create + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DIS_019(m_createContainerBase)); + v_ae1.done; + }//end TC_CSE_DIS_019_CRE + + testcase TC_CSE_DIS_019_UPD() runs on Tester system CseSystem { //Update + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + var template RequestPrimitive v_updateRequest := m_updateContainerBase; + var Labels v_labels_1:= {"VALUE_1"}; + v_updateRequest.primitiveContent.container.labels := v_labels_1; + v_ae1.start(f_CSE_DIS_019(v_updateRequest)); + v_ae1.done; + }//end TC_CSE_DIS_019_UPD + + testcase TC_CSE_DIS_019_DEL() runs on Tester system CseSystem { //Delete + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DIS_019(m_delete("Temporary", "Temporary"))); + v_ae1.done; + }//end TC_CSE_DIS_019_DEL + + }//end group g_CSE_DIS_019 + + group g_CSE_DIS_020{ + + /** + * @desc Check that the IUT responds to the originator with a success response when the originator sends a Discovery-based OPERATION including two conflicted filter criteria of different type FILTER_CRITERIA_CONDITION_1 and FILTER_CRITERIA_CONDITION_2 (E.G. createBefore < createdAfter) + * + */ + testcase TC_CSE_DIS_020_CRB_CRA_CRE() runs on Tester system CseSystem { + + //Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + var FilterCriteria v_filterCriteria := valueof(m_filterCriteria); + + v_filterCriteria.createdBefore := "20171231T012345"; + v_filterCriteria.createdAfter := "20181231T012345"; + v_filterCriteria.filterUsage := int1; + + v_ae1.start(f_CSE_DIS_020(m_createContainerBase, v_filterCriteria)); + v_ae1.done; + } + + testcase TC_CSE_DIS_020_MS_US_CRE() runs on Tester system CseSystem { + + //Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + var FilterCriteria v_filterCriteria := valueof(m_filterCriteria); + + v_filterCriteria.unmodifiedSince := "20171231T012345"; + v_filterCriteria.modifiedSince := "20181231T012345"; + v_filterCriteria.filterUsage := int1; + + v_ae1.start(f_CSE_DIS_020(m_createContainerBase, v_filterCriteria)); + v_ae1.done; + } + + testcase TC_CSE_DIS_020_STS_STB_CRE() runs on Tester system CseSystem { + + //Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + var FilterCriteria v_filterCriteria := valueof(m_filterCriteria); + v_filterCriteria.stateTagSmaller := 1; + v_filterCriteria.stateTagBigger := 2; + v_filterCriteria.filterUsage := int1; + + v_ae1.start(f_CSE_DIS_020(m_createContainerBase, v_filterCriteria)); + v_ae1.done; + } + + testcase TC_CSE_DIS_020_EXB_EXA_CRE() runs on Tester system CseSystem { + + //Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + var FilterCriteria v_filterCriteria := valueof(m_filterCriteria); + + v_filterCriteria.expireBefore := "20171231T012345"; + v_filterCriteria.expireAfter := "20181231T012345"; + v_filterCriteria.filterUsage := int1; + + v_ae1.start(f_CSE_DIS_020(m_createContainerBase, v_filterCriteria)); + v_ae1.done; + } + + testcase TC_CSE_DIS_020_CRB_CRA_UPD() runs on Tester system CseSystem { + + //Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + var template RequestPrimitive v_updateRequest := m_updateContainerBase; + var Labels v_labels_1:= {"VALUE_1"}; + var FilterCriteria v_filterCriteria := valueof(m_filterCriteria); + + v_filterCriteria.createdBefore := "20171231T012345"; + v_filterCriteria.createdAfter := "20181231T012345"; + v_filterCriteria.filterUsage := int1; + + v_updateRequest.primitiveContent.container.labels := v_labels_1; + + v_ae1.start(f_CSE_DIS_020(v_updateRequest, v_filterCriteria)); + v_ae1.done; + } + + testcase TC_CSE_DIS_020_MS_US_UPD() runs on Tester system CseSystem { + + //Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + var template RequestPrimitive v_updateRequest := m_updateContainerBase; + var Labels v_labels_1:= {"VALUE_1"}; + var FilterCriteria v_filterCriteria := valueof(m_filterCriteria); + + v_filterCriteria.unmodifiedSince := "20171231T012345"; + v_filterCriteria.modifiedSince := "20181231T012345"; + v_filterCriteria.filterUsage := int1; + + v_updateRequest.primitiveContent.container.labels := v_labels_1; + + v_ae1.start(f_CSE_DIS_020(v_updateRequest, v_filterCriteria)); + v_ae1.done; + } + + testcase TC_CSE_DIS_020_STS_STB_UPD() runs on Tester system CseSystem { + + //Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + var template RequestPrimitive v_updateRequest := m_updateContainerBase; + var Labels v_labels_1:= {"VALUE_1"}; + var FilterCriteria v_filterCriteria := valueof(m_filterCriteria); + + v_filterCriteria.stateTagSmaller := 1; + v_filterCriteria.stateTagBigger := 2; + v_filterCriteria.filterUsage := int1; + + v_updateRequest.primitiveContent.container.labels := v_labels_1; + + v_ae1.start(f_CSE_DIS_020(v_updateRequest, v_filterCriteria)); + v_ae1.done; + } + + testcase TC_CSE_DIS_020_EXB_EXA_UPD() runs on Tester system CseSystem { + + //Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + var template RequestPrimitive v_updateRequest := m_updateContainerBase; + var Labels v_labels_1:= {"VALUE_1"}; + var FilterCriteria v_filterCriteria := valueof(m_filterCriteria); + + v_filterCriteria.expireBefore := "20171231T012345"; + v_filterCriteria.expireAfter := "20181231T012345"; + v_filterCriteria.filterUsage := int1; + + v_updateRequest.primitiveContent.container.labels := v_labels_1; + + v_ae1.start(f_CSE_DIS_020(v_updateRequest, v_filterCriteria)); + v_ae1.done; + } + + testcase TC_CSE_DIS_020_CRB_CRA_DEL() runs on Tester system CseSystem { + + //Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + var FilterCriteria v_filterCriteria := valueof(m_filterCriteria); + + v_filterCriteria.createdBefore := "20171231T012345"; + v_filterCriteria.createdAfter := "20181231T012345"; + v_filterCriteria.filterUsage := int1; + + v_ae1.start(f_CSE_DIS_020(m_delete("Temporary", "Temporary"), v_filterCriteria)); + v_ae1.done; + } + + testcase TC_CSE_DIS_020_MS_US_DEL() runs on Tester system CseSystem { + + //Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + var FilterCriteria v_filterCriteria := valueof(m_filterCriteria); + + v_filterCriteria.unmodifiedSince := "20171231T012345"; + v_filterCriteria.modifiedSince := "20181231T012345"; + v_filterCriteria.filterUsage := int1; + + v_ae1.start(f_CSE_DIS_020(m_delete("Temporary", "Temporary"), v_filterCriteria)); + v_ae1.done; + } + + testcase TC_CSE_DIS_020_STS_STB_DEL() runs on Tester system CseSystem { + + //Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + var FilterCriteria v_filterCriteria := valueof(m_filterCriteria); + v_filterCriteria.stateTagSmaller := 1; + v_filterCriteria.stateTagBigger := 2; + v_filterCriteria.filterUsage := int1; + + v_ae1.start(f_CSE_DIS_020(m_delete("Temporary", "Temporary"), v_filterCriteria)); + v_ae1.done; + } + + testcase TC_CSE_DIS_020_EXB_EXA_DEL() runs on Tester system CseSystem { + + //Local variables + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + var FilterCriteria v_filterCriteria := valueof(m_filterCriteria); + + v_filterCriteria.expireBefore := "20171231T012345"; + v_filterCriteria.expireAfter := "20181231T012345"; + v_filterCriteria.filterUsage := int1; + + v_ae1.start(f_CSE_DIS_020(m_delete("Temporary", "Temporary"), v_filterCriteria)); + v_ae1.done; + } + + }//end TC_CSE_DIS_020 + + group g_CSE_DIS_021 { + + /** + * @desc Check that the IUT returns the empty content when resources match the filter criteria but they do not include Discovery-based OPERATION permission + * + */ + testcase TC_CSE_DIS_021_CRE() runs on Tester system CseSystem { //Create + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DIS_021(m_createContainerBase)); + v_ae1.done; + }//end TC_CSE_DIS_021_CRE + + testcase TC_CSE_DIS_021_UPD() runs on Tester system CseSystem { //Update + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + var template RequestPrimitive v_updateRequest := m_updateContainerBase; + var Labels v_labels_1:= {"VALUE_1"}; + v_updateRequest.primitiveContent.container.labels := v_labels_1; + v_ae1.start(f_CSE_DIS_021(v_updateRequest)); + v_ae1.done; + }//end TC_CSE_DIS_021_UPD + + testcase TC_CSE_DIS_021_DEL() runs on Tester system CseSystem { //Delete + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DIS_021(m_delete("Temporary", "Temporary"))); + v_ae1.done; + }//end TC_CSE_DIS_021_DEL + + }//end group g_CSE_DIS_021 + + group g_CSE_DIS_022 { + + /** + * @desc Check that the IUT successfully performs a Discovery-based OPERATION using hierarchical addressing form when the Result Content and Desired Identifier Result Type is provided in the request + * + */ + testcase TC_CSE_DIS_022_CRE() runs on Tester system CseSystem { //Create + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DIS_022(m_createContainerBase)); + v_ae1.done; + }//end TC_CSE_DIS_022_CRE + + testcase TC_CSE_DIS_022_UPD() runs on Tester system CseSystem { //Update + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + var template RequestPrimitive v_updateRequest := m_updateContainerBase; + var Labels v_labels_1:= {"VALUE_1"}; + v_updateRequest.primitiveContent.container.labels := v_labels_1; + v_ae1.start(f_CSE_DIS_022(v_updateRequest)); + v_ae1.done; + }//end TC_CSE_DIS_022_UPD + + testcase TC_CSE_DIS_022_DEL() runs on Tester system CseSystem { //Delete + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DIS_022(m_delete("Temporary", "Temporary"))); + v_ae1.done; + }//end TC_CSE_DIS_022_DEL + + }//end group g_CSE_DIS_022 + + group g_CSE_DIS_023 { + + /** + * @desc Check that the IUT successfully performs a Discovery-based OPERATION using hierarchical addressing form when the Desired Identifier Result Type is not provided in the request + * + */ + testcase TC_CSE_DIS_023_CRE() runs on Tester system CseSystem { //Create + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DIS_023(m_createContainerBase)); + v_ae1.done; + }//end TC_CSE_DIS_023_CRE + + testcase TC_CSE_DIS_023_UPD() runs on Tester system CseSystem { //Update + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + var template RequestPrimitive v_updateRequest := m_updateContainerBase; + var Labels v_labels_1:= {"VALUE_1"}; + v_updateRequest.primitiveContent.container.labels := v_labels_1; + v_ae1.start(f_CSE_DIS_023(v_updateRequest)); + v_ae1.done; + }//end TC_CSE_DIS_023_UPD + + testcase TC_CSE_DIS_023_DEL() runs on Tester system CseSystem { //Delete + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DIS_023(m_delete("Temporary", "Temporary"))); + v_ae1.done; + }//end TC_CSE_DIS_023_DEL + + }//end group g_CSE_DIS_023 + + group g_CSE_DIS_024 { + + /** + * @desc Check that the IUT responds to the originator with an error when resources match the filter criteria in a Discovery-based OPERATION request but including an invalid Content + * + */ + testcase TC_CSE_DIS_024_CRE() runs on Tester system CseSystem { //Create + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DIS_024(m_createContainerBaseInvalid)); + v_ae1.done; + }//end TC_CSE_DIS_024_CRE + + testcase TC_CSE_DIS_024_UPD() runs on Tester system CseSystem { //Update + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + var template RequestPrimitive v_updateRequest := m_updateContainerBase; + var Labels v_labels_1:= {"VALUE_1"}; + var XSD.PositiveInteger v_expirationCounter := 1; + v_updateRequest.primitiveContent.container.labels := v_labels_1; + v_updateRequest.primitiveContent := {container_invalid := m_contentUpdateContainer_invalid}; + v_updateRequest.primitiveContent.container_invalid.expirationCounter := v_expirationCounter; + + v_ae1.start(f_CSE_DIS_024(v_updateRequest)); + v_ae1.done; + }//end TC_CSE_DIS_024_UPD + + }//end group g_CSE_DIS_024 + + group g_CSE_DIS_025 { + + /** + * @desc Check that the IUT successfully performs a Discovery-based OPERATION when resources match the filter criteria containing geoQuery condition provided in the request + * + */ + testcase TC_CSE_DIS_025_CRE() runs on Tester system CseSystem { //Create + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DIS_025(m_createContainerBase, int2001)); + v_ae1.done; + }//end TC_CSE_DIS_025_CRE + + testcase TC_CSE_DIS_025_UPD() runs on Tester system CseSystem { //Update + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + var template RequestPrimitive v_updateRequest := m_updateContainerBase; + var Labels v_labels_1:= {"VALUE_2"}; + v_updateRequest.primitiveContent.container.labels := v_labels_1; + v_ae1.start(f_CSE_DIS_025(v_updateRequest, int2004)); + v_ae1.done; + }//end TC_CSE_DIS_025_UPD + + testcase TC_CSE_DIS_025_DEL() runs on Tester system CseSystem { //Delete + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DIS_025(m_delete("Temporary", "Temporary"), int2002)); + v_ae1.done; + }//end TC_CSE_DIS_025_DEL + + }//end group g_CSE_DIS_025 + + group g_CSE_DIS_026 { + + /** + * @desc Check that the IUT returns the empty content when no result matching with filter criteria containing geoQuery condition provided in a Discovery-based OPERATION + * + */ + testcase TC_CSE_DIS_026_CRE() runs on Tester system CseSystem { //Create + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DIS_026(m_createContainerBase)); + v_ae1.done; + }//end TC_CSE_DIS_026_CRE + + testcase TC_CSE_DIS_026_UPD() runs on Tester system CseSystem { //Update + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + var template RequestPrimitive v_updateRequest := m_updateContainerBase; + var Labels v_labels_1:= {"VALUE_1"}; + v_updateRequest.primitiveContent.container.labels := v_labels_1; + v_ae1.start(f_CSE_DIS_026(v_updateRequest)); + v_ae1.done; + }//end TC_CSE_DIS_026_UPD + + testcase TC_CSE_DIS_026_DEL() runs on Tester system CseSystem { //Delete + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DIS_026(m_delete("Temporary", "Temporary"))); + v_ae1.done; + }//end TC_CSE_DIS_026_DEL + + }//end group g_CSE_DIS_026 + + group g_CSE_DIS_027 { + + /** + * @desc Check that the IUT responds to the originator with an error when the originator sends a Discovery-based OPERATION request including an invalid format of filter criteria containing geoQuery condition to discover the resource TARGET_RESOURCE_ADDRESS + * + */ + testcase TC_CSE_DIS_027_CRE() runs on Tester system CseSystem { //Create + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DIS_027(m_createContainerBase)); + v_ae1.done; + }//end TC_CSE_DIS_027_CRE + + testcase TC_CSE_DIS_027_UPD() runs on Tester system CseSystem { //Update + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + var template RequestPrimitive v_updateRequest := m_updateContainerBase; + var Labels v_labels_1:= {"VALUE_1"}; + v_updateRequest.primitiveContent.container.labels := v_labels_1; + v_ae1.start(f_CSE_DIS_027(v_updateRequest)); + v_ae1.done; + }//end TC_CSE_DIS_027_UPD + + testcase TC_CSE_DIS_027_DEL() runs on Tester system CseSystem { //Delete + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DIS_027(m_delete("Temporary", "Temporary"))); + v_ae1.done; + }//end TC_CSE_DIS_027_DEL + + }//end group g_CSE_DIS_027 + + group g_CSE_DIS_028 { + + /** + * @desc Check that the IUT returns the empty content when the originator sends a Discovery-based OPERATION request including filter criteria containing geQuery condition but resources do not have location attribute + * + */ + testcase TC_CSE_DIS_028_CRE() runs on Tester system CseSystem { //Create + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DIS_028(m_createContainerBase)); + v_ae1.done; + }//end TC_CSE_DIS_028_CRE + + testcase TC_CSE_DIS_028_UPD() runs on Tester system CseSystem { //Update + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + var template RequestPrimitive v_updateRequest := m_updateContainerBase; + var Labels v_labels_1:= {"VALUE_1"}; + v_updateRequest.primitiveContent.container.labels := v_labels_1; + v_ae1.start(f_CSE_DIS_028(v_updateRequest)); + v_ae1.done; + }//end TC_CSE_DIS_028_UPD + + testcase TC_CSE_DIS_028_DEL() runs on Tester system CseSystem { //Delete + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DIS_028(m_delete("Temporary", "Temporary"))); + v_ae1.done; + }//end TC_CSE_DIS_028_DEL + + }//end group g_CSE_DIS_028 + + group g_CSE_DIS_029 { + + /** + * @desc Check that the IUT accepts Discovery-based OPERATION requests to the resource TARGET_RESOURCE_ADDRESS when AE has privilege to perform the discovery operation on the children/descendant but AE has no privilege to perform discovery operation of parent resource TARGET_RESOURCE_ADDRESS + * + */ + testcase TC_CSE_DIS_029_CRE() runs on Tester system CseSystem { //Create + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DIS_029(m_createContainerBase, int2001)); + v_ae1.done; + }//end TC_CSE_DIS_029_CRE + + testcase TC_CSE_DIS_029_UPD() runs on Tester system CseSystem { //Update + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + var template RequestPrimitive v_updateRequest := m_updateContainerBase; + var Labels v_labels_1:= {"VALUE_1"}; + v_updateRequest.primitiveContent.container.labels := v_labels_1; + v_ae1.start(f_CSE_DIS_029(v_updateRequest, int2004)); + v_ae1.done; + }//end TC_CSE_DIS_029_UPD + + testcase TC_CSE_DIS_029_DEL() runs on Tester system CseSystem { //Delete + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DIS_029(m_delete("Temporary", "Temporary"), int2002)); + v_ae1.done; + }//end TC_CSE_DIS_029_DEL + + }//end group g_CSE_DIS_029 + + group g_CSE_DIS_030 { + + /** + * @desc Check that the IUT returns the empty content in a Discovery-based OPERATION when resource has status marked as INACTIVE + * + */ + testcase TC_CSE_DIS_030_CRE() runs on Tester system CseSystem { //Create + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DIS_030(m_createContainerBase)); + v_ae1.done; + }//end TC_CSE_DIS_030_CRE + + testcase TC_CSE_DIS_030_UPD() runs on Tester system CseSystem { //Update + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + var template RequestPrimitive v_updateRequest := m_updateContainerBase; + var Labels v_labels_1:= {"VALUE_1"}; + v_updateRequest.primitiveContent.container.labels := v_labels_1; + v_ae1.start(f_CSE_DIS_030(v_updateRequest)); + v_ae1.done; + }//end TC_CSE_DIS_030_UPD + + testcase TC_CSE_DIS_030_DEL() runs on Tester system CseSystem { //Delete + var AeSimu v_ae1 := AeSimu.create("AE1") alive; + + v_ae1.start(f_CSE_DIS_030(m_delete("Temporary", "Temporary"))); + v_ae1.done; + }//end TC_CSE_DIS_030_DEL + + }//end group g_CSE_DIS_030 + + }//end group Basic_Operations + + }//end group Discovery + }//end group CSE }