parent 656aecd4
......@@ -1126,10 +1126,10 @@ module OneM2M_Templates {
/**
* @desc Base NOTIFY request primitive
*/
template RequestPrimitive m_notify := {
template RequestPrimitive m_notify(XSD.ID p_resourceAddress) := {
operation := int5,
to_ := "NotInitialized",
from_ := omit,
to_ := p_resourceAddress,
from_ := "NotInitialized",
requestIdentifier := testcasename() & "-m_notify" & f_rnd(1, 1000000),
resourceType := omit,
primitiveContent := {notification := m_contentCreateNotification_allOmit},
......
......@@ -37,7 +37,7 @@ module OneM2M_PermutationFunctions {
var integer v_parentIndex := -1;
var integer v_resourceIndex := -1;
var MsgIn v_request;
var PrimitiveContent v_modifiedResource;
var PrimitiveContent v_resource;
var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for container containing To set to " & f_getLocalResourceAddress(0, e_nonHierarchical, p_primitiveScope);
if(not(PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT)) {
......@@ -57,14 +57,15 @@ module OneM2M_PermutationFunctions {
tc_ac.stop;
setverdict(pass, __SCOPE__, " : Container creation request received successfuly");
v_parentIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
v_modifiedResource := f_ae_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, v_parentIndex, v_request.primitive.requestPrimitive.resourceType);
v_resourceIndex := f_setLocalResource(v_modifiedResource, v_request.primitive.requestPrimitive.resourceType, v_parentIndex);
v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, v_modifiedResource));
v_resource := f_ae_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));
mcaPortIn.send(m_response(v_responsePrimitive));
}
[] mcaPortIn.receive(mw_request(?)) {
tc_ac.stop;
setverdict(fail, __SCOPE__, " : Error while creating container");
mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
stop;
}
[] tc_ac.timeout {
......@@ -78,12 +79,14 @@ module OneM2M_PermutationFunctions {
}
function f_AE_GEN_CRE_002(PrimitiveScope p_primitiveScope) runs on CseSimu {
var MsgIn v_request;
var Integer v_parentIndex := -1;
var Integer v_resourceIndex := -1;
var ResponsePrimitive v_responsePrimitive;
var template UtTriggerPrimitive v_utRequest := m_utCreateContainer;
var UtTriggerAckPrimitive v_trigger_response;
var PrimitiveContent v_resource;
var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for container containing To set to " & f_getLocalResourceAddress(-, e_hierarchical, p_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");
......@@ -102,13 +105,16 @@ module OneM2M_PermutationFunctions {
[] 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_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, omit));
v_parentIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
v_resource := f_ae_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));
mcaPortIn.send(m_response(v_responsePrimitive));
}
[] mcaPortIn.receive(mw_request(?)) {
tc_ac.stop;
setverdict(fail, __SCOPE__, " : Error while creating container");
mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
stop;
}
[] tc_ac.timeout {
......@@ -130,7 +136,7 @@ module OneM2M_PermutationFunctions {
var ResponsePrimitive v_responsePrimitive;
var template UtTriggerPrimitive v_utRequest := m_utUpdateContainer;
var UtTriggerAckPrimitive v_trigger_response;
var integer v_auxInteger;
var integer v_resourceIndex;
var PrimitiveContent v_localResource;
var universal charstring v_action := __SCOPE__ & ": Please, send a valid UPDATE Request for container containing To set to " & f_getLocalResourceAddress(-, e_nonHierarchical, p_primitiveScope);
......@@ -144,22 +150,24 @@ module OneM2M_PermutationFunctions {
//Send Trigger Message
v_localResource := f_ae_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);
v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex, e_nonHierarchical, p_primitiveScope);
f_sendUtPrimitive(v_utRequest,v_action);
tc_ac.start;
alt {
[] mcaPortIn.receive(mw_request(mw_updateContainer(-,v_utRequest.requestPrimitive.to_))) -> value (v_request) {
[] mcaPortIn.receive(mw_request(mw_updateContainer(-,v_utRequest.requestPrimitive.to_))) -> value v_request {
tc_ac.stop;
setverdict(pass, __SCOPE__, " : Container update request received successfuly");
v_responsePrimitive := valueof(m_responsePrimitive(int2004, v_request.primitive.requestPrimitive.requestIdentifier, omit));
v_resourceIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
f_cse_updateLocalResource(v_resourceIndex, v_request.primitive.requestPrimitive.primitiveContent);
v_responsePrimitive := valueof(m_responsePrimitive(int2004, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
mcaPortIn.send(m_response(v_responsePrimitive));
}
[] mcaPortIn.receive(mw_request(?)) {
tc_ac.stop;
setverdict(fail, __SCOPE__, " : Error while updating container");
mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
stop;
}
[] tc_ac.timeout {
......@@ -176,7 +184,7 @@ module OneM2M_PermutationFunctions {
var ResponsePrimitive v_responsePrimitive;
var template UtTriggerPrimitive v_utRequest := m_utUpdateContainer;
var UtTriggerAckPrimitive v_trigger_response;
var integer v_auxInteger;
var integer v_resourceIndex := -1;
var PrimitiveContent v_localResource;
var universal charstring v_action := __SCOPE__ & ": Please, send a valid UPDATE Request for container containing To set to " & f_getLocalResourceAddress(-, e_hierarchical, p_primitiveScope);
......@@ -189,8 +197,8 @@ module OneM2M_PermutationFunctions {
//Send Trigger Message
v_localResource := f_ae_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);
v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex, e_hierarchical, p_primitiveScope);
f_sendUtPrimitive(v_utRequest,v_action);
tc_ac.start;
......@@ -198,13 +206,15 @@ module OneM2M_PermutationFunctions {
[] mcaPortIn.receive(mw_request(mw_updateContainer(-,v_utRequest.requestPrimitive.to_))) -> value (v_request) {
tc_ac.stop;
setverdict(pass, __SCOPE__, " : Container update request received successfuly");
v_responsePrimitive := valueof(m_responsePrimitive(int2004, v_request.primitive.requestPrimitive.requestIdentifier, omit));
v_resourceIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
f_cse_updateLocalResource(v_resourceIndex, v_request.primitive.requestPrimitive.primitiveContent);
v_responsePrimitive := valueof(m_responsePrimitive(int2004, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
mcaPortIn.send(m_response(v_responsePrimitive));
}
[] mcaPortIn.receive(mw_request(?)) {
tc_ac.stop;
setverdict(fail, __SCOPE__, " : Error while updating container");
mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
stop;
}
[] tc_ac.timeout {
......@@ -227,7 +237,7 @@ module OneM2M_PermutationFunctions {
var template UtTriggerPrimitive v_utRequestTemplate;
var UtTriggerPrimitive v_utRequest;
var UtTriggerAckPrimitive v_trigger_response;
var integer v_auxInteger;
var integer v_resourceIndex := -1;
var PrimitiveContent v_localResource;
var universal charstring v_action := __SCOPE__ & ": Please, send a valid RETRIEVE Request for container containing To set to " & f_getLocalResourceAddress(-, e_nonHierarchical, p_primitiveScope);
......@@ -240,8 +250,8 @@ module OneM2M_PermutationFunctions {
//Send Trigger Message
v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3);
v_auxInteger := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
v_utRequestTemplate := m_utRetrieve(f_getLocalResourceAddress(v_auxInteger, e_nonHierarchical, p_primitiveScope));
v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
v_utRequestTemplate := m_utRetrieve(f_getLocalResourceAddress(v_resourceIndex, e_nonHierarchical, p_primitiveScope));
f_sendUtPrimitive(v_utRequestTemplate,v_action);
v_utRequest := valueof(v_utRequestTemplate);
......@@ -250,13 +260,14 @@ module OneM2M_PermutationFunctions {
[] mcaPortIn.receive(mw_request(mw_retrieve(v_utRequest.requestPrimitive.to_))) -> value (v_request) {
tc_ac.stop;
setverdict(pass, __SCOPE__, " : Container retrieve request received successfuly");
v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, omit));
v_resourceIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
mcaPortIn.send(m_response(v_responsePrimitive));
}
[] mcaPortIn.receive(mw_request(?)) {
tc_ac.stop;
setverdict(fail, __SCOPE__, " : Error while retrieving container");
mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
stop;
}
[] tc_ac.timeout {
......@@ -274,7 +285,7 @@ module OneM2M_PermutationFunctions {
var template UtTriggerPrimitive v_utRequestTemplate;
var UtTriggerPrimitive v_utRequest;
var UtTriggerAckPrimitive v_trigger_response;
var integer v_auxInteger;
var integer v_resourceIndex := -1;
var PrimitiveContent v_localResource;
var universal charstring v_action := __SCOPE__ & ": Please, send a valid RETRIEVE Request for container containing To set to " & f_getLocalResourceAddress(-, e_hierarchical, p_primitiveScope);
......@@ -287,8 +298,8 @@ module OneM2M_PermutationFunctions {
//Send Trigger Message
v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3);
v_auxInteger := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
v_utRequestTemplate := m_utRetrieve(f_getLocalResourceAddress(v_auxInteger, e_hierarchical, p_primitiveScope));
v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
v_utRequestTemplate := m_utRetrieve(f_getLocalResourceAddress(v_resourceIndex, e_hierarchical, p_primitiveScope));
v_utRequest := valueof(v_utRequestTemplate);
f_sendUtPrimitive(v_utRequest,v_action);
......@@ -297,13 +308,14 @@ module OneM2M_PermutationFunctions {
[] mcaPortIn.receive(mw_request(mw_retrieve(v_utRequest.requestPrimitive.to_))) -> value (v_request) {
tc_ac.stop;
setverdict(pass, __SCOPE__, " : Container retrieve request received successfuly");
v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, omit));
v_resourceIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
mcaPortIn.send(m_response(v_responsePrimitive));
}
[] mcaPortIn.receive(mw_request(?)) {
tc_ac.stop;
setverdict(fail, __SCOPE__, " : Error while retrieving container");
mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
stop;
}
[] tc_ac.timeout {
......@@ -347,20 +359,21 @@ module OneM2M_PermutationFunctions {
[] mcaPortIn.receive(mw_request(mw_delete(v_utRequest.requestPrimitive.to_))) -> value (v_request) {
tc_ac.stop;
setverdict(pass, __SCOPE__, " : Container update request received successfuly");
v_responsePrimitive := valueof(m_responsePrimitive(int2004, v_request.primitive.requestPrimitive.requestIdentifier, omit));
mcaPortIn.send(m_response(v_responsePrimitive));
}
[] mcaPortIn.receive(mw_request(?)) {
tc_ac.stop;
setverdict(fail, __SCOPE__, " : Error while updating container");
mcaPortIn.send(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;
}
}
}" &Conflicts in index. Try without --index.
"
// Postamble
f_cf03Down();
......@@ -393,13 +406,13 @@ module OneM2M_PermutationFunctions {
[] mcaPortIn.receive(mw_request(mw_delete(v_utRequest.requestPrimitive.to_))) -> value (v_request) {
tc_ac.stop;
setverdict(pass, __SCOPE__, " : Container update request received successfuly");
v_responsePrimitive := valueof(m_responsePrimitive(int2004, v_request.primitive.requestPrimitive.requestIdentifier, omit));
mcaPortIn.send(m_response(v_responsePrimitive));
}
[] mcaPortIn.receive(mw_request(?)) {
tc_ac.stop;
setverdict(fail, __SCOPE__, " : Error while updating container");
mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
stop;
}
[] tc_ac.timeout {
......@@ -424,6 +437,9 @@ module OneM2M_PermutationFunctions {
//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();
......@@ -439,15 +455,18 @@ module OneM2M_PermutationFunctions {
[] mcaPortIn.receive(mw_request(p_request)) -> value v_request {
tc_ac.stop;
setverdict(pass, __SCOPE__, " : AE registration request is accepted!!");
//v_responsePrimitive := valueof(m_responsePrimitiveTemp(int2000, omit));
v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, omit));
v_parentIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
v_resource := f_ae_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
mcaPortIn.send(m_response(v_responsePrimitive));
}
[] mcaPortIn.receive(mw_request(mw_createAe(*,?,m_contentCreateAe_Invalid))) -> value v_request {
tc_ac.stop;
setverdict(fail, __SCOPE__, " : AE registration request is rejected due to not including the optional attribute!");
mcaPortIn.send(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!");
......@@ -473,6 +492,9 @@ module OneM2M_PermutationFunctions {
function f_AE_DMR_CRE_003(template UtTriggerPrimitive p_utRequest, template RequestPrimitive p_request, in universal charstring p_action) runs on CseSimu {
var MsgIn v_request;
var integer v_parentIndex := -1;
var integer v_resourceIndex := -1;
var PrimitiveContent v_resource;
var PrimitiveContent v_localResource;
var integer v_containerIndex := -1;
var ResponsePrimitive v_responsePrimitive;
......@@ -495,10 +517,11 @@ module OneM2M_PermutationFunctions {
[] mcaPortIn.receive(mw_request(p_request)) -> value (v_request) {
tc_ac.stop;
setverdict(pass, __SCOPE__, " : ContentInstance creation request is accepted!!");
//set responseStatusCode back to SUT
v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, omit));
v_parentIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
v_resource := f_ae_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
mcaPortIn.send(m_response(v_responsePrimitive));
}
......@@ -506,6 +529,7 @@ module OneM2M_PermutationFunctions {
[] mcaPortIn.receive {
tc_ac.stop;
setverdict(fail, __SCOPE__, " : ContentInstance creation request is rejected due to not including the attribute!");
mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
}
[] tc_ac.timeout{
......@@ -518,6 +542,9 @@ module OneM2M_PermutationFunctions {
}
function f_AE_DMR_CRE_004(template UtTriggerPrimitive p_utRequest, template RequestPrimitive p_request, in universal charstring p_action) runs on CseSimu {
var MsgIn v_request;
var integer v_parentIndex := -1;
var integer v_resourceIndex := -1;
var PrimitiveContent v_resource;
var ResponsePrimitive v_responsePrimitive;
//Test component configuration
......@@ -536,19 +563,19 @@ module OneM2M_PermutationFunctions {
[] mcaPortIn.receive(mw_request(p_request)) -> value (v_request) {
tc_ac.stop;
setverdict(pass, __SCOPE__, " : Container creation request is accepted!!");
//set responseStatusCode back to SUT
v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, omit));
v_parentIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
v_resource := f_ae_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
mcaPortIn.send(m_response(v_responsePrimitive));
}
[] mcaPortIn.receive {
tc_ac.stop;
setverdict(fail, __SCOPE__, " : Container creation request is rejected due to not including the attribute!");
mcaPortIn.send(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!");
}
......@@ -566,9 +593,9 @@ module OneM2M_PermutationFunctions {
//primitives for mcaPortIn
var MsgIn v_request;
var integer v_auxInteger := -1;
var PrimitiveContent v_modifiedResource;
var integer v_resourceIndex := -1;
var PrimitiveContent v_localResource;
var ResponsePrimitive v_responsePrimitive;
f_cf03Up();
......@@ -576,8 +603,8 @@ module OneM2M_PermutationFunctions {
//Send Trigger Message
v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentAe(m_contentCreateAe(omit, omit, omit, omit))), vc_cSEBaseIndex, int2);
v_auxInteger := f_setLocalResource(v_localResource, int2, vc_cSEBaseIndex);
p_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger);
v_resourceIndex := f_setLocalResource(v_localResource, int2, vc_cSEBaseIndex);
p_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex);
f_sendUtPrimitive(p_utRequest,p_action);
//Test behavior
......@@ -587,14 +614,15 @@ module OneM2M_PermutationFunctions {
[] mcaPortIn.receive(mw_request(p_expectedUpdateRequest)) -> value v_request {
tc_ac.stop;
setverdict(pass, __SCOPE__, " : AE update request is accepted!");
vc_response.primitive.responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, omit));
mcaPortIn.send(m_response(vc_response.primitive.responsePrimitive));
v_resourceIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
f_cse_updateLocalResource(v_resourceIndex, v_request.primitive.requestPrimitive.primitiveContent);
v_responsePrimitive := valueof(m_responsePrimitive(int2004, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
mcaPortIn.send(m_response(v_responsePrimitive));
}
[] mcaPortIn.receive(mw_request(?)) -> value v_request {
tc_ac.stop;
setverdict(fail, __SCOPE__, " : AE update request is rejected due to not including the optional attribute!");
mcaPortIn.send(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!");
......@@ -610,15 +638,15 @@ module OneM2M_PermutationFunctions {
var MsgIn v_request;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_localResource;
var integer v_auxInteger := -1;
var integer v_resourceIndex := -1;
//Test component configuration
f_cf03Up();
//send triggering primitive to SUT
v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), vc_cSEBaseIndex, int3);
v_auxInteger := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
p_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger);
v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
p_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex);
f_sendUtPrimitive(p_utRequest,p_action);
//Test behavior
......@@ -629,17 +657,16 @@ module OneM2M_PermutationFunctions {
[] mcaPortIn.receive(mw_request(p_request)) -> value (v_request) {
tc_ac.stop;
setverdict(pass, __SCOPE__, " : Container update request is accepted!!");
//set responseStatusCode back to SUT
v_responsePrimitive := valueof(m_responsePrimitive(int2004, v_request.primitive.requestPrimitive.requestIdentifier, omit));
//send back responsePrimitive
v_resourceIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
f_cse_updateLocalResource(v_resourceIndex, v_request.primitive.requestPrimitive.primitiveContent);
v_responsePrimitive := valueof(m_responsePrimitive(int2004, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
mcaPortIn.send(m_response(v_responsePrimitive));
}
[] mcaPortIn.receive {
tc_ac.stop;
setverdict(fail, __SCOPE__, " : Container update request is rejected due to not including the attribute!");
mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
}
[] tc_ac.timeout{
......@@ -662,34 +689,31 @@ module OneM2M_PermutationFunctions {
var MsgIn v_request;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_localResource;
var integer v_auxInteger := -1;
var integer v_resourceIndex := -1;
//Test component configuration
f_cf03Up();
//send triggering primitive to SUT
v_localResource := f_ae_generateLocalResource(valueof(p_primitiveContent), vc_cSEBaseIndex, p_resourceType);
v_auxInteger := f_setLocalResource(v_localResource, p_resourceType, vc_cSEBaseIndex);
v_utRequest := m_utRetrieve(f_getLocalResourceAddress(v_auxInteger));
v_resourceIndex := f_setLocalResource(v_localResource, p_resourceType, vc_cSEBaseIndex);
v_utRequest := m_utRetrieve(f_getLocalResourceAddress(v_resourceIndex));
f_sendUtPrimitive(v_utRequest,p_action);
//Test behavior
tc_ac.start;
alt{
[] mcaPortIn.receive(mw_request(mw_retrieve(f_getLocalResourceAddress(v_auxInteger)))) -> value v_request {
[] 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!!");
//set responseStatusCode back to SUT
v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, omit));
//send back responsePrimitive
v_resourceIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
mcaPortIn.send(m_response(v_responsePrimitive));
tc_ac.stop;
}
[] mcaPortIn.receive {
tc_ac.stop;
setverdict(fail, __SCOPE__, " : error while retrieving resource !");
mcaPortIn.send(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!");
......@@ -716,6 +740,9 @@ module OneM2M_PermutationFunctions {
function f_AE_SUB_CRE_002(template UtTriggerPrimitive p_utRequest, template RequestPrimitive p_request, in universal charstring p_action) runs on CseSimu {
var MsgIn v_request;
var integer v_parentIndex := -1;
var integer v_resourceIndex := -1;
var PrimitiveContent v_resource;
var ResponsePrimitive v_responsePrimitive;
f_cf03Up();
......@@ -730,16 +757,19 @@ module OneM2M_PermutationFunctions {
[] mcaPortIn.receive(mw_request(p_request)) -> value v_request {
tc_ac.stop;
setverdict(pass, __SCOPE__, " : Subscription creation request is accepted!");
//set responseStatusCode back to SUT
v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, omit));
v_parentIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
v_resource := f_ae_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));
" &Conflicts in index. Try without --index.
"
//send back responsePrimitive
mcaPortIn.send(m_response(v_responsePrimitive));
}
[] mcaPortIn.receive {
tc_ac.stop;
setverdict(fail, __SCOPE__, " : Subscription creation request is rejected due to not including the optional attribute!");
mcaPortIn.send(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!");
......
......@@ -463,7 +463,9 @@ module OneM2M_Testcases_AE_Release_1 {
//primitives for utPort
var template UtTriggerPrimitive v_utRequest := m_utCreateAe;
var integer v_parentIndex := -1;
var integer v_resourceIndex := -1;
var PrimitiveContent v_resource;
//primitives for mcaPortIn
var MsgIn v_request;
......@@ -484,8 +486,10 @@ module OneM2M_Testcases_AE_Release_1 {
[] mcaPortIn.receive(mw_request(v_requestPrimitive)) -> value v_request {
tc_ac.stop;
setverdict(pass, __SCOPE__, " : AE registration request is accepted!!");
//v_responsePrimitive := valueof(m_responsePrimitiveTemp(int2000, omit));
v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, omit));
v_parentIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
v_resource := f_ae_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
mcaPortIn.send(m_response(v_responsePrimitive));
......@@ -493,6 +497,7 @@ module OneM2M_Testcases_AE_Release_1 {
[] mcaPortIn.receive(mw_request(mw_createAe(*,?,m_contentCreateAe_Invalid))) -> value v_request {
tc_ac.stop;
setverdict(fail, __SCOPE__, " : AE registration request is rejected due to not including mandatory attributes!!");
mcaPortIn.send(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!");
......@@ -688,9 +693,7 @@ module OneM2M_Testcases_AE_Release_1 {
[] mcaPortIn.receive(mw_request(mw_delete(v_utRequest.requestPrimitive.to_))) -> value v_request {
tc_ac.stop;
setverdict(pass, __SCOPE__, " : AE deregistration request is accepted!");
//v_responsePrimitive := valueof(m_responsePrimitiveTemp(int2000, omit));
v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, omit));
v_responsePrimitive := valueof(m_responsePrimitive(int2002, v_request.primitive.requestPrimitive.requestIdentifier, omit));
//send back responsePrimitive
mcaPortIn.send(m_response(v_responsePrimitive));
......@@ -698,6 +701,7 @@ module OneM2M_Testcases_AE_Release_1 {
[] mcaPortIn.receive {
tc_ac.stop;
setverdict(fail, __SCOPE__, " : Error while AE deregistration");
mcaPortIn.send(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!");
......@@ -734,6 +738,9 @@ module OneM2M_Testcases_AE_Release_1 {
//variables
var template UtTriggerPrimitive v_utRequest := m_utCreateContainer;
var MsgIn v_request;
var integer v_parentIndex := -1;
var integer v_resourceIndex := -1;
var PrimitiveContent v_resource;
var template RequestPrimitive v_requestPrimitive := mw_createContainer;
var ResponsePrimitive v_responsePrimitive;
var universal charstring v_action := __SCOPE__ & ": Please, send a valid CREATE Request for container";
......@@ -751,9 +758,10 @@ module OneM2M_Testcases_AE_Release_1 {
[] mcaPortIn.receive(mw_request(v_requestPrimitive)) -> value v_request {
tc_ac.stop;
setverdict(pass, __SCOPE__, " : Container creation request is accepted!");
//set responseStatusCode back to SUT
v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, omit));
v_parentIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
v_resource := f_ae_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
mcaPortIn.send(m_response(v_responsePrimitive));
......@@ -761,6 +769,7 @@ module OneM2M_Testcases_AE_Release_1 {
[] mcaPortIn.receive {
tc_ac.stop;
setverdict(fail, __SCOPE__, " : Container creation request is rejected due to not including mandatory attributes!!");
mcaPortIn.send(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!");
......@@ -787,6 +796,9 @@ module OneM2M_Testcases_AE_Release_1 {
var template UtTriggerPrimitive v_utRequest := m_utCreateContentInstance;
var MsgIn v_request;
var integer v_parentIndex := -1;
var integer v_resourceIndex := -1;
var PrimitiveContent v_resource;
var PrimitiveContent v_localResource;
var integer v_containerIndex := -1;
var template RequestPrimitive v_requestPrimitive := mw_createContentInstance;
......@@ -811,17 +823,18 @@ module OneM2M_Testcases_AE_Release_1 {
[] mcaPortIn.receive(mw_request(v_requestPrimitive)) -> value v_request {
tc_ac.stop;
setverdict(pass, __SCOPE__, " : ContentInstance creation request is accepted!!");
//set responseStatusCode back to SUT
v_responsePrimitive := valueof(m_responsePrimitive(int2001, v_request.primitive.requestPrimitive.requestIdentifier, omit));
v_parentIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
v_resource := f_ae_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
mcaPortIn.send(m_response(v_responsePrimitive));
}
[] mcaPortIn.receive {
tc_ac.stop;
setverdict(fail, __SCOPE__, " : ContentInstance creation request is rejected due to not including mandatory attributes!!");
mcaPortIn.send(m_response(valueof(m_responsePrimitive(int4004, v_request.primitive.requestPrimitive.requestIdentifier, omit))));
}
[] tc_ac.timeout{
......@@ -1294,7 +1307,7 @@ module OneM2M_Testcases_AE_Release_1 {
function f_AE_DMR_RET_002() runs on CseSimu {
var integer v_auxInteger := -1;
var integer v_resourceIndex := -1;
var PrimitiveContent v_localResource;
//variables
......@@ -1308,8 +1321,8 @@ module OneM2M_Testcases_AE_Release_1 {
//send triggering primitive to SUT
v_localResource := f_ae_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) & "/" & c_resourceShortNameOldest;
v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex) & "/" & c_resourceShortNameOldest;
f_sendUtPrimitive(v_utRequest,v_action);
//Test behavior
......@@ -1318,17 +1331,14 @@ module OneM2M_Testcases_AE_Release_1 {
[] mcaPortIn.receive(mw_request(mw_retrieve(v_utRequest.requestPrimitive.to_ ))) -> value v_request {
tc_ac.stop;
setverdict(pass, __SCOPE__, " : retrieve attribute oldest request is accepted!");
//set responseStatusCode back to SUT
v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, omit));
//send back responsePrimitive
v_resourceIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
mcaPortIn.send(m_response(v_responsePrimitive));
tc_ac.stop;
}
[] mcaPortIn.receive {
tc_ac.stop;
setverdict(fail, __SCOPE__, " : error while retrieving attribute !");
mcaPortIn.send(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!");
......@@ -1354,7 +1364,7 @@ module OneM2M_Testcases_AE_Release_1 {
function f_AE_DMR_RET_003() runs on CseSimu {
var integer v_auxInteger := -1;
var integer v_resourceIndex := -1;
var PrimitiveContent v_localResource;
//variables
......@@ -1368,8 +1378,8 @@ module OneM2M_Testcases_AE_Release_1 {
//send triggering primitive to SUT
v_localResource := f_ae_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) & "/" & c_resourceShortNameLatest;
v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex) & "/" & c_resourceShortNameLatest;
f_sendUtPrimitive(v_utRequest,v_action);
//Test behavior
......@@ -1378,17 +1388,14 @@ module OneM2M_Testcases_AE_Release_1 {
[] mcaPortIn.receive(mw_request(mw_retrieve(v_utRequest.requestPrimitive.to_))) -> value v_request {
tc_ac.stop;
setverdict(pass, __SCOPE__, " : retrieve attribute latest request is accepted!!");
//set responseStatusCode back to SUT
v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, omit));
//send back responsePrimitive
v_resourceIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
mcaPortIn.send(m_response(v_responsePrimitive));
tc_ac.stop;
}
[] mcaPortIn.receive {
tc_ac.stop;
setverdict(fail, __SCOPE__, " : error while retrieving attribute !");
mcaPortIn.send(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!");
......@@ -1414,7 +1421,7 @@ module OneM2M_Testcases_AE_Release_1 {
function f_AE_DMR_RET_004() runs on CseSimu {
var integer v_auxInteger := -1;
var integer v_resourceIndex := -1;
var PrimitiveContent v_localResource;
//variables
......@@ -1428,8 +1435,8 @@ module OneM2M_Testcases_AE_Release_1 {
//send triggering primitive to SUT
v_localResource := f_ae_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);
v_resourceIndex := f_setLocalResource(v_localResource, int3, vc_cSEBaseIndex);
v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex);
f_sendUtPrimitive(v_utRequest,v_action);
//Test behavior
......@@ -1438,17 +1445,14 @@ module OneM2M_Testcases_AE_Release_1 {
[] mcaPortIn.receive(mw_request(mw_retrieve(v_utRequest.requestPrimitive.to_))) -> value v_request {
tc_ac.stop;
setverdict(pass, __SCOPE__, " : retrieve resource type request is accepted!!");
//set responseStatusCode back to SUT
v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, omit));
//send back responsePrimitive
v_resourceIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
mcaPortIn.send(m_response(v_responsePrimitive));
tc_ac.stop;
}
[] mcaPortIn.receive {
tc_ac.stop;
setverdict(fail, __SCOPE__, " : error while retrieving resource !");
mcaPortIn.send(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!");
......@@ -1474,7 +1478,7 @@ module OneM2M_Testcases_AE_Release_1 {
function f_AE_DMR_RET_005() runs on CseSimu {
var integer v_auxInteger := -1;
var integer v_resourceIndex := -1;
var PrimitiveContent v_localResource;
//variables
......@@ -1488,8 +1492,8 @@ module OneM2M_Testcases_AE_Release_1 {
//send triggering primitive to SUT
v_localResource := f_ae_generateLocalResource(valueof(m_primitiveContentContentInstance(m_contentCreateContentInstance)), vc_cSEBaseIndex, int4);
v_auxInteger := f_setLocalResource(v_localResource, int4, vc_cSEBaseIndex);
v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_auxInteger);
v_resourceIndex := f_setLocalResource(v_localResource, int4, vc_cSEBaseIndex);
v_utRequest.requestPrimitive.to_ := f_getLocalResourceAddress(v_resourceIndex);
f_sendUtPrimitive(v_utRequest,v_action);
//Test behavior
......@@ -1498,17 +1502,14 @@ module OneM2M_Testcases_AE_Release_1 {
[] mcaPortIn.receive(mw_request(mw_retrieve(v_utRequest.requestPrimitive.to_))) -> value v_request {
tc_ac.stop;
setverdict(pass, __SCOPE__, " : retrieve resource type request is accepted!!");
//set responseStatusCode back to SUT
v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, omit));
//send back responsePrimitive
v_resourceIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
v_responsePrimitive := valueof(m_responsePrimitive(int2000, v_request.primitive.requestPrimitive.requestIdentifier, vc_localResourcesList[v_resourceIndex].resource));
mcaPortIn.send(m_response(v_responsePrimitive));
tc_ac.stop;
}
[] mcaPortIn.receive {
tc_ac.stop;
setverdict(fail, __SCOPE__, " : error while retrieving resource !");