Commit 09e869bc authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Review of f_CSE_ANNC_CRE_007


Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parent cc14e013
......@@ -2212,7 +2212,7 @@ module OneM2M_Functions {
var MsgIn v_response;
var RequestPrimitive v_request;
var PrimitiveContent v_remoteCSEResource;
var PrimitiveContent v_localRemoteCSEResource;
//Activate defaults when running on a PTC
f_cse_activateDefaults_cse1();
......@@ -2227,8 +2227,8 @@ module OneM2M_Functions {
setverdict(pass, __SCOPE__&":INFO: Resource type remoteCSE created successfuly");
f_checkAttributesToBeSaved(int16, v_request, v_response.primitive.responsePrimitive);
vc_remoteCseIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int16, -1);
v_remoteCSEResource := f_generateLocalResource(v_response.primitive.responsePrimitive.primitiveContent, vc_cSEBaseIndex, int16);
vc_localRemoteCseIndex := f_setLocalResource(v_remoteCSEResource, int16, vc_cSEBaseIndex);
v_localRemoteCSEResource := f_generateLocalResource(m_primitiveContentRemoteCSE(m_contentCreateRemoteCSE(f_resourceIdCleaner(v_response.primitive.responsePrimitive.from_),omit,v_response.primitive.responsePrimitive.from_,v_response.primitive.responsePrimitive.from_)),vc_cSEBaseIndex, int16);
vc_localRemoteCseIndex := f_setLocalResource(v_localRemoteCSEResource, int16, vc_cSEBaseIndex);
}
[] mccPort.receive(mw_response(mw_responsePrimitiveKO)) {
tc_ac.stop;
......
......@@ -7374,9 +7374,12 @@ module OneM2M_PermutationFunctions {
var integer v_aEAnncIndex := -1;
var ResponsePrimitive v_responsePrimitive;
var template RequestPrimitive v_create := m_createAe(PX_APP_ID, omit, omit);
var template RequestPrimitive v_createRemoteCSE := m_createRemoteCSEBase;
var template RequestPrimitive v_createContainer := m_createContainerBase;
v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
v_ae1.done;
// Test control
// Test component configuration
......@@ -7384,7 +7387,7 @@ module OneM2M_PermutationFunctions {
// Test adapter configuration
// Register the CSE
vc_remoteCseIndex := f_cse_registerRemoteCse(m_createRemoteCSEBase);
vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSEBase);
//Preamble
v_ae1.start(f_cse_createResource(int2,v_create));
......@@ -7392,12 +7395,18 @@ module OneM2M_PermutationFunctions {
v_aeIndex := f_getLatestResourceIndex(v_ae1);
// Test Body
v_ae1.start(f_cse_createResource(p_resourceType,p_requestCreatePrimitive, v_aeIndex));
v_createContainer.primitiveContent.container.announceTo := {"/CSE2_ID"};
v_createContainer.primitiveContent.container.resourceName := "TriggerAnnounceIUT";
v_ae1.start(f_cse_createResource(int3,v_createContainer, v_aeIndex));
//IUT shall announce itself by updating announceTo attribute of its remoteCSE on its registrar (CSE1)
f_cse_updateResourceHandler(vc_localRemoteCseIndex, mw_updateRemoteCSE);
v_ae1.stop;
// Test Body
v_ae1.start(f_cse_createResource(p_resourceType,p_requestCreatePrimitive, v_aeIndex));
//IUT shall then create the announced resource on its remoteCSEAnnc as indicated in the announceTo attribute returned by its registrar (CSE1)
p_createRequestAnnc.to_ := vc_localResourcesList[vc_localRemoteCseIndex].resource.remoteCSE.announceTo[0];
f_cse_announcementProcedure_createHandler(p_createRequestAnnc, -);
......@@ -7473,43 +7482,27 @@ module OneM2M_PermutationFunctions {
// Test control
// Test component configuration
f_cf02UpCseSimuMaster();
f_cf02UpCseSimuMaster();
// Test adapter configuration
// Register the CSE
vc_remoteCseIndex := f_cse_registerRemoteCse(m_createRemoteCSEBase);
//Preamble
v_ae1.start(f_cse_createResource(int2,v_create));
v_ae1.done;
v_aeIndex := f_getLatestResourceIndex(v_ae1);
// Test Body
v_ae1.start(f_cse_sendCreateRequestPrimitive(p_resourceType,p_requestCreatePrimitive, v_parentIndex));
v_ae1.start(f_cse_createResource(p_resourceType,p_requestCreatePrimitive, v_aeIndex));
tc_ac.start;
alt {
[] mccPortIn.receive(mw_request(mw_createRemoteCSEAnnc(-, -, -))) -> value v_request {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ":INFO: CREATE REQUEST for remoteCSEAnnc received");
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ":ERROR: No CREATE REQUEST received");
}
}
tc_ac.start;
alt {
[] mccPortIn.receive(mw_request(p_createRequestAnnc)) -> value v_request {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ":INFO: CREATE REQUEST received");
if(match(v_request.primitive.requestPrimitive.to_, f_getLocalResourceAddress(v_aEAnncIndex, e_hierarchical, e_spRelative)) or
match(v_request.primitive.requestPrimitive.to_, f_getLocalResourceAddress(v_aEAnncIndex, e_nonHierarchical, e_spRelative))) {
setverdict(pass, __SCOPE__ & ":matching ANNC_PARENT_RESOURCE_ADDRESS");
} else {
setverdict(fail, __SCOPE__ & ":mis-matching ANNC_PARENT_RESOURCE_ADDRESS");
}
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ":ERROR: No CREATE REQUEST received");
}
}
//IUT shall announce itself by updating announceTo attribute of its remoteCSE on its registrar (CSE1)
f_cse_updateResourceHandler(vc_localRemoteCseIndex, mw_updateRemoteCSE);
//IUT shall then create the announced resource on its remoteCSEAnnc as indicated in the announceTo attribute returned by its registrar (CSE1)
p_createRequestAnnc.to_ := vc_localResourcesList[vc_localRemoteCseIndex].resource.remoteCSE.announceTo[0];
f_cse_announcementProcedure_createHandler(p_createRequestAnnc, -);
v_ae1.done;
......
......@@ -10494,7 +10494,7 @@ module OneM2M_Testcases_CSE_Release_2 {
v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
v_cse1.done;
v_createRequest.primitiveContent.accessControlPolicy.announceTo := {PX_CSE1_ID};
v_createRequest.primitiveContent.accessControlPolicy.announceTo := {"/CSE2_ID"};
v_cse1.start(f_CSE_ANNC_CRE_005_CseSimu(int1, v_createRequestAnnc, v_createRequest));//AccessControlPolicy
v_cse1.done;
......@@ -10508,7 +10508,7 @@ module OneM2M_Testcases_CSE_Release_2 {
v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
v_cse1.done;
v_createRequest.primitiveContent.container.announceTo := {PX_CSE1_ID};
v_createRequest.primitiveContent.container.announceTo := {"/CSE2_ID"};
v_cse1.start(f_CSE_ANNC_CRE_005_CseSimu(int3, v_createRequestAnnc, v_createRequest));//Container
v_cse1.done;
......@@ -10537,7 +10537,7 @@ module OneM2M_Testcases_CSE_Release_2 {
v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
v_cse1.done;
v_createRequest.primitiveContent.group_.announceTo := {PX_CSE1_ID};
v_createRequest.primitiveContent.group_.announceTo := {"/CSE2_ID"};
v_cse1.start(f_CSE_ANNC_CRE_005_CseSimu(int9, v_createRequestAnnc, v_createRequest));//Group
v_cse1.done;
......@@ -10551,7 +10551,7 @@ module OneM2M_Testcases_CSE_Release_2 {
v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
v_cse1.done;
v_createRequest.primitiveContent.timeSeries.announceTo := {PX_CSE1_ID};
v_createRequest.primitiveContent.timeSeries.announceTo := {"/CSE2_ID"};
v_cse1.start(f_CSE_ANNC_CRE_005_CseSimu(int29, v_createRequestAnnc, v_createRequest));//TimeSeries
v_cse1.done;
......@@ -10565,7 +10565,7 @@ module OneM2M_Testcases_CSE_Release_2 {
v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
v_cse1.done;
v_createRequest.primitiveContent.timeSeriesInstance.announceTo := {PX_CSE1_ID};
v_createRequest.primitiveContent.timeSeriesInstance.announceTo := {"/CSE2_ID"};
v_cse1.start(f_CSE_ANNC_CRE_005_CseSimu(int30, v_createRequestAnnc, v_createRequest));//TimeSeriesInstance
v_cse1.done;
......@@ -10679,8 +10679,8 @@ module OneM2M_Testcases_CSE_Release_2 {
var template RequestPrimitive v_createRequestAnnc := mw_createAccessControlPolicyAnnc;
v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
v_cse1.done;
v_createRequest.primitiveContent.accessControlPolicy.announceTo := {PX_CSE1_ID};
v_cse1.done;
v_createRequest.primitiveContent.accessControlPolicy.announceTo := {"/CSE2_ID"};
v_cse1.start(f_CSE_ANNC_CRE_007_CseSimu(int1, v_createRequestAnnc, v_createRequest));//AccessControlPolicy
v_cse1.done;
......@@ -10693,8 +10693,8 @@ module OneM2M_Testcases_CSE_Release_2 {
var template RequestPrimitive v_createRequestAnnc := mw_createContainerAnncBase;
v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
v_cse1.done;
v_createRequest.primitiveContent.container.announceTo := {PX_CSE1_ID};
v_cse1.done;
v_createRequest.primitiveContent.container.announceTo := {"/CSE2_ID"};
v_cse1.start(f_CSE_ANNC_CRE_007_CseSimu(int3, v_createRequestAnnc, v_createRequest));//Container
v_cse1.done;
......@@ -10707,8 +10707,8 @@ module OneM2M_Testcases_CSE_Release_2 {
var template RequestPrimitive v_createRequestAnnc := mw_createContentInstanceAnnc;
v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
v_cse1.done;
v_createRequest.primitiveContent.contentInstance.announceTo := {PX_CSE1_ID};
v_cse1.done;
v_createRequest.primitiveContent.contentInstance.announceTo := {"/CSE2_ID"};
v_cse1.start(f_CSE_ANNC_CRE_007_CseSimu(int4, v_createRequestAnnc, v_createRequest));//ContentInstance
v_cse1.done;
......@@ -10722,8 +10722,8 @@ module OneM2M_Testcases_CSE_Release_2 {
var template RequestPrimitive v_createRequestAnnc := mw_createGroupAnncBase;
v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
v_cse1.done;
v_createRequest.primitiveContent.group_.announceTo := {PX_CSE1_ID};
v_cse1.done;
v_createRequest.primitiveContent.group_.announceTo := {"/CSE2_ID"};
v_cse1.start(f_CSE_ANNC_CRE_007_CseSimu(int9, v_createRequestAnnc, v_createRequest));//Group
v_cse1.done;
......@@ -10736,10 +10736,9 @@ module OneM2M_Testcases_CSE_Release_2 {
var template RequestPrimitive v_createRequestAnnc := mw_createTimeSeriesAnncBase;
v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
v_cse1.done;
v_createRequest.primitiveContent.accessControlPolicy.announceTo := {PX_CSE1_ID};
v_createRequest.primitiveContent.accessControlPolicy.announcedAttribute := {"mbs"};
v_cse1.done;
v_createRequest.primitiveContent.accessControlPolicy.announceTo := {"/CSE2_ID"};
v_cse1.start(f_CSE_ANNC_CRE_007_CseSimu(int29, v_createRequestAnnc, v_createRequest));//TimeSeries
v_cse1.done;
}
......@@ -10750,11 +10749,9 @@ module OneM2M_Testcases_CSE_Release_2 {
var template RequestPrimitive v_createRequest := m_createTimeSeriesInstanceBase;
var template RequestPrimitive v_createRequestAnnc := mw_createTimeSeriesInstanceAnncBase;
v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
v_cse1.done;
v_cse1.done;
v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
v_cse1.done;
v_createRequest.primitiveContent.timeSeriesInstance.announceTo := {PX_CSE1_ID};
v_createRequest.primitiveContent.timeSeriesInstance.announceTo := {"/CSE2_ID"};
v_cse1.start(f_CSE_ANNC_CRE_007_CseSimu(int30, v_createRequestAnnc, v_createRequest));//TimeSeriesInstance
v_cse1.done;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment