Commit e75ee72f authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files
parent 95d81d07
......@@ -925,10 +925,11 @@ module OneM2M_PermutationFunctions {
// Local variables
var RequestPrimitive v_request;
var RequestPrimitive v_groupRequest := m_createGroupBase;
var integer v_aeIndex := -1;
var integer v_groupIndex := -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)) {
......@@ -943,22 +944,26 @@ module OneM2M_PermutationFunctions {
// Preamble
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex);
v_groupRequest.primitiveContent.group_.memberIDs := {f_getResourceId(vc_resourcesList[v_resourceIndex].resource)};
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_hybrid;
v_primitiveScope := p_primitiveScope;
v_request := f_getCreateRequestPrimitive(int3, m_createContainerBase, v_resourceIndex);
v_request.to_ := f_getResourceAddress(v_resourceIndex, v_addressingMethod, v_primitiveScope);
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_mca_port, m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value vc_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Container resource created using hierarchical addressing method");
setverdict(pass, __SCOPE__ & ": Fanout operation performed successfully by using hybrid addressing");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
tc_ac.stop;
......@@ -1161,9 +1166,11 @@ module OneM2M_PermutationFunctions {
// Local variables
var integer v_aeIndex := -1;
var integer v_groupIndex := -1;
var integer v_resourceIndex := -1;
var AddressingMethod v_addressingMethod;
var PrimitiveScope v_primitiveScope;
var RequestPrimitive v_request;
var RequestPrimitive v_groupRequest := m_createGroupBase;
// Test control
if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) {
......@@ -1181,17 +1188,22 @@ module OneM2M_PermutationFunctions {
v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex);
v_groupRequest.primitiveContent.group_.memberIDs := {f_getResourceId(vc_resourcesList[v_resourceIndex].resource)};
v_groupIndex := f_cse_createResource(int9, v_groupRequest, v_aeIndex);
// Test Body
//Force usage of Hybrid Hierarchical addressing method
v_addressingMethod := e_hybrid;
v_primitiveScope := p_primitiveScope;
f_send(e_mca_port, m_request(m_retrieve(f_getResourceAddress(v_resourceIndex, v_addressingMethod, v_primitiveScope), f_getOriginator(v_resourceIndex))));
v_addressingMethod := e_nonHierarchical;
v_request := m_retrieve(f_getResourceAddress(v_groupIndex, v_addressingMethod, p_primitiveScope), f_getOriginator(v_groupIndex));
v_request.to_ := v_request.to_ & "/fopt";
f_send(e_mca_port, m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value vc_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Container resource retrieved using hybrid addressing method");
setverdict(pass, __SCOPE__ & ": Fanout operation performed successfully by using hybrid addressing");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
tc_ac.stop;
......@@ -1199,10 +1211,10 @@ module OneM2M_PermutationFunctions {
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error while retrieving container resource using hybrid addressing method");
setverdict(fail, __SCOPE__ & ": Error while creating container resource using hierarchical addressing method");
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while retrieving resource");
setverdict(fail, __SCOPE__ & ": No answer while creating resource");
}
}
......@@ -1211,7 +1223,7 @@ module OneM2M_PermutationFunctions {
// Tear down
f_cf01Down();
}//end f_CSE_GEN_RET_004
} // end of group Retrieve
......@@ -1410,11 +1422,12 @@ module OneM2M_PermutationFunctions {
function f_CSE_GEN_UPD_004(in PrimitiveScope p_primitiveScope) runs on AeSimu system CseSystem {
// Local variables
var 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;
var PrimitiveScope v_primitiveScope;
// Test control
if(not(PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) {
......@@ -1432,22 +1445,24 @@ module OneM2M_PermutationFunctions {
v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex);
// Test Body
//Force usage of Hybrid Hierarchical addressing method
v_addressingMethod := e_hybrid;
v_primitiveScope := p_primitiveScope;
v_groupRequest.primitiveContent.group_.memberIDs := {f_getResourceId(vc_resourcesList[v_resourceIndex].resource)};
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"};
v_updateRequest := f_getUpdateRequestPrimitive(int3, v_resourceIndex, v_updateRequest);
v_updateRequest.to_ := f_getResourceAddress(v_resourceIndex, v_addressingMethod, v_primitiveScope);
//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_mca_port, m_request(v_updateRequest));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value vc_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Container resource updated using hierarchical addressing method");
setverdict(pass, __SCOPE__ & ": Fanout operation performed successfully by using hybrid addressing");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
tc_ac.stop;
......@@ -1455,10 +1470,10 @@ module OneM2M_PermutationFunctions {
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error while updating container resource using hierarchical addressing method");
setverdict(fail, __SCOPE__ & ": Error while creating container resource using hierarchical addressing method");
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while updating resource");
setverdict(fail, __SCOPE__ & ": No answer while creating resource");
}
}
......@@ -1467,7 +1482,7 @@ module OneM2M_PermutationFunctions {
// Tear down
f_cf01Down();
}//end f_CSE_GEN_UPD_004
} // end of group Update
......@@ -1658,10 +1673,11 @@ module OneM2M_PermutationFunctions {
// Local variables
var RequestPrimitive v_request;
var RequestPrimitive v_groupRequest := m_createGroupBase;
var integer v_aeIndex := -1;
var integer v_groupIndex := -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)) {
......@@ -1679,19 +1695,22 @@ module OneM2M_PermutationFunctions {
v_resourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex);
v_groupRequest.primitiveContent.group_.memberIDs := {f_getResourceId(vc_resourcesList[v_resourceIndex].resource)};
v_groupIndex := f_cse_createResource(int9, v_groupRequest, v_aeIndex);
// Test Body
//Force usage of Hybrid Hierarchical addressing method
v_addressingMethod := e_hybrid;
v_primitiveScope := p_primitiveScope;
v_request := valueof(m_delete(f_getResourceAddress(v_resourceIndex, v_addressingMethod, v_primitiveScope), f_getOriginator(v_resourceIndex)));
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_mca_port, m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2002))) {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) -> value vc_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Container resource deleted using hierarchical addressing method");
setverdict(pass, __SCOPE__ & ": Fanout operation performed successfully by using hybrid addressing");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
tc_ac.stop;
......@@ -1699,10 +1718,10 @@ module OneM2M_PermutationFunctions {
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error while deleting container resource using hierarchical addressing method");
setverdict(fail, __SCOPE__ & ": Error while creating container resource using hierarchical addressing method");
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while deleting resource");
setverdict(fail, __SCOPE__ & ": No answer while creating resource");
}
}
......
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