Commit 06c12969 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega

Merge branch 'Release1' of https://git.onem2m.org/TST/ATS into Release1

parents dfa8c842 7566082b
......@@ -1004,9 +1004,16 @@ module OneM2M_Functions {
* @param p_requestPrimitive UPDATE request primitive to be used
* @verdict
*/
function f_cse_updateResource(in RequestPrimitive p_requestPrimitive) runs on AeSimu {
function f_cse_updateResource(in ResourceType p_resourceType, integer p_resourceIndex, template RequestPrimitive p_request, template (omit) AttributeAux_list p_nullFields := omit) runs on AeSimu {
mcaPort.send(f_getMsgOutPrimitive(m_request(p_requestPrimitive)));
var RequestPrimitive v_request;
//Activate defaults when running on a PTC
f_cse_activateDefaults_ae();
v_request := f_getUpdateRequestPrimitive(p_resourceType, p_resourceIndex, p_request);
mcaPort.send(f_getMsgOutPrimitive(m_request(valueof(p_request), p_nullFields)));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response {
......
......@@ -4891,8 +4891,7 @@ module OneM2M_PermutationFunctions {
v_setOfArcs.accessControlRule_list := {v_accessControlRule_1, v_accessControlRule_2};
v_updateRequest := valueof(m_updateAcpPrivileges(v_setOfArcs, -));
v_updateRequest := f_getUpdateRequestPrimitive(int1, vc_acpAuxIndex, v_updateRequest);
f_cse_updateResource(v_updateRequest);
f_cse_updateResource(int1, vc_acpAuxIndex, v_updateRequest);
//Adjustments for ACP resource type
if(p_resourceType == int1) {
......@@ -5617,8 +5616,7 @@ module OneM2M_PermutationFunctions {
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));
v_updateRequest := f_getUpdateRequestPrimitive(int1, v_acpIndex, v_updateRequest);
f_cse_updateResource(v_updateRequest);
f_cse_updateResource(int1, v_acpIndex, v_updateRequest);
// Test Body
p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex);
......@@ -5684,14 +5682,12 @@ module OneM2M_PermutationFunctions {
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, -));
v_updateRequest := f_getUpdateRequestPrimitive(int1, v_acpIndex1, v_updateRequest);
f_cse_updateResource(v_updateRequest);
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, -));
v_updateRequest := f_getUpdateRequestPrimitive(int1, v_acpIndex2, v_updateRequest);
f_cse_updateResource(v_updateRequest);
f_cse_updateResource(int1, v_acpIndex2, v_updateRequest);
// Test Body
p_requestPrimitive.to_ := f_getResourceAddress(v_aeIndex);
......@@ -6306,8 +6302,7 @@ module OneM2M_PermutationFunctions {
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, -));
v_updateRequest := f_getUpdateRequestPrimitive(int1, v_acpIndex, v_updateRequest);
f_cse_updateResource(v_updateRequest);
f_cse_updateResource(int1, v_acpIndex, v_updateRequest);
// Test Body
v_request := f_getCreateRequestPrimitive(int3, p_requestPrimitive, v_containerIndex);
......
......@@ -95,7 +95,6 @@ module OneM2M_Testcases_CSE_Release_1 {
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
v_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
v_ae1.done;
v_ae1.done;
v_ae1.start(f_CSE_GEN_CRE_001(e_cseRelative));
v_ae1.done;
......@@ -565,6 +564,7 @@ module OneM2M_Testcases_CSE_Release_1 {
var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
v_cse1.done;
v_cse1.start(f_CSE_REG_CRE_003());
......@@ -583,8 +583,9 @@ module OneM2M_Testcases_CSE_Release_1 {
v_remoteCseIndex := f_cse_registrationRemoteCse();
vc_ae1 := AeSimu.create("AE1") alive;
vc_ae1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_AE1));
vc_ae1.done;
vc_ae1.start(f_cse_preamble_registerAe());
vc_ae1.done;
}
......@@ -6488,8 +6489,7 @@ module OneM2M_Testcases_CSE_Release_1 {
// Test Body
if(ispresent(vc_resourcesList[v_containerIndex].resource.container.stateTag)) {
v_updateRequest := f_getUpdateRequestPrimitive(int3, v_containerIndex, v_updateRequest);
f_cse_updateResource(v_updateRequest);
f_cse_updateResource(int3, v_containerIndex, v_updateRequest);
mcaPort.send(f_getMsgOutPrimitive(m_request(m_retrieve(f_getResourceAddress(v_containerIndex), f_getOriginator(v_containerIndex)))));
......@@ -9695,8 +9695,7 @@ module OneM2M_Testcases_CSE_Release_1 {
v_setOfArcs_1.accessControlRule_list := {v_accessControlRule_1};
v_setOfArcs_2.accessControlRule_list := {v_accessControlRule_2};
v_updateRequest := valueof(m_updateAcpPrivileges(v_setOfArcs_1, v_setOfArcs_2));
v_updateRequest := f_getUpdateRequestPrimitive(int1, v_acpIndex1, v_updateRequest);
f_cse_updateResource(v_updateRequest);
f_cse_updateResource(int1, v_acpIndex1, v_updateRequest);
// Test Body
v_updateRequest := valueof(m_updateAeBase);
......@@ -9790,8 +9789,7 @@ module OneM2M_Testcases_CSE_Release_1 {
v_setOfArcs_1.accessControlRule_list := {v_accessControlRule_1};
v_setOfArcs_2.accessControlRule_list := {v_accessControlRule_2};
v_updateRequest := valueof(m_updateAcpPrivileges(v_setOfArcs_1, v_setOfArcs_2));
v_updateRequest := f_getUpdateRequestPrimitive(int1, v_acpIndex1, v_updateRequest);
f_cse_updateResource(v_updateRequest);
f_cse_updateResource(int1, v_acpIndex1, v_updateRequest);
// Test Body
v_updateRequest := valueof(m_updateAeBase);
......
This diff is collapsed.
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