Correction of mandatory and optional attributes expected in mw_ templates +

refactoring of templates names to keep consistency
Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parent 8025c861
...@@ -922,7 +922,7 @@ module OneM2M_Functions { ...@@ -922,7 +922,7 @@ module OneM2M_Functions {
*/ */
function f_cse_retrieveResource(integer p_resourceIndex) runs on AeSimu return PrimitiveContent{ function f_cse_retrieveResource(integer p_resourceIndex) runs on AeSimu return PrimitiveContent{
mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(p_resourceIndex), f_getOriginator(p_resourceIndex)))); mcaPort.send(m_request(m_retrieve(f_getResourceAddress(p_resourceIndex), f_getOriginator(p_resourceIndex))));
tc_ac.start; tc_ac.start;
alt { alt {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response {
...@@ -994,7 +994,7 @@ module OneM2M_Functions { ...@@ -994,7 +994,7 @@ module OneM2M_Functions {
function f_isResourcePresent (integer p_resourceIndex) runs on AeSimu return boolean { function f_isResourcePresent (integer p_resourceIndex) runs on AeSimu return boolean {
//Check to see if the resource is present or not //Check to see if the resource is present or not
mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(p_resourceIndex), f_getOriginator(p_resourceIndex)))); mcaPort.send(m_request(m_retrieve(f_getResourceAddress(p_resourceIndex), f_getOriginator(p_resourceIndex))));
tc_ac.start; tc_ac.start;
alt { alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) { [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000))) {
...@@ -1023,7 +1023,7 @@ module OneM2M_Functions { ...@@ -1023,7 +1023,7 @@ module OneM2M_Functions {
function f_isResourcePresentCseSimu (integer p_resourceIndex) runs on CseSimu return boolean { function f_isResourcePresentCseSimu (integer p_resourceIndex) runs on CseSimu return boolean {
//Check to see if the resource is present or not //Check to see if the resource is present or not
mccPort.send(m_request(m_retrieveResource(f_getResourceAddress(p_resourceIndex), f_getOriginator(p_resourceIndex)))); mccPort.send(m_request(m_retrieve(f_getResourceAddress(p_resourceIndex), f_getOriginator(p_resourceIndex))));
tc_ac.start; tc_ac.start;
alt { alt {
[] mccPort.receive(mw_response(mw_responsePrimitive(int2000))) { [] mccPort.receive(mw_response(mw_responsePrimitive(int2000))) {
...@@ -1055,7 +1055,7 @@ module OneM2M_Functions { ...@@ -1055,7 +1055,7 @@ module OneM2M_Functions {
log(testcasename() & ":INFO: Hierarchical addressing method is required to check the non presence of the resource"); log(testcasename() & ":INFO: Hierarchical addressing method is required to check the non presence of the resource");
//Check to see if the resource has NOT been created //Check to see if the resource has NOT been created
mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(p_parentIndex, e_hierarchical) & "/" & p_resourceName, f_getOriginator(p_parentIndex)))); mcaPort.send(m_request(m_retrieve(f_getResourceAddress(p_parentIndex, e_hierarchical) & "/" & p_resourceName, f_getOriginator(p_parentIndex))));
tc_ac.start; tc_ac.start;
alt { alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int4004))) { [] mcaPort.receive(mw_response(mw_responsePrimitive(int4004))) {
...@@ -1335,11 +1335,11 @@ module OneM2M_Functions { ...@@ -1335,11 +1335,11 @@ module OneM2M_Functions {
tc_ac.start; tc_ac.start;
alt { alt {
[] mcaPortIn.receive(mw_request(mw_notify(v_notificationRequest))) -> value vc_request { [] mcaPortIn.receive(mw_request(mw_notifyNotification(v_notificationRequest))) -> value vc_request {
tc_ac.stop; tc_ac.stop;
setverdict(pass, __SCOPE__ & ":INFO: Notification received"); setverdict(pass, __SCOPE__ & ":INFO: Notification received");
} }
[] mcaPortIn.receive(mw_request(mw_notify(mw_contentNotification(?)))) -> value vc_request { [] mcaPortIn.receive(mw_request(mw_notifyNotification(mw_contentNotification(?)))) -> value vc_request {
tc_ac.stop; tc_ac.stop;
setverdict(fail, __SCOPE__ & ":ERROR: Notification received but verificationRequest isn't set to TRUE"); setverdict(fail, __SCOPE__ & ":ERROR: Notification received but verificationRequest isn't set to TRUE");
} }
...@@ -1377,7 +1377,7 @@ module OneM2M_Functions { ...@@ -1377,7 +1377,7 @@ module OneM2M_Functions {
tc_ac.start; tc_ac.start;
alt { alt {
[] mcaPortIn.receive(mw_request(mw_notify(mw_contentNotification(?)))) -> value vc_request { [] mcaPortIn.receive(mw_request(mw_notifyNotification(mw_contentNotification(?)))) -> value vc_request {
tc_ac.stop; tc_ac.stop;
if(f_check_notificationContent(vc_request.primitive.requestPrimitive, p_primitiveContent)){ if(f_check_notificationContent(vc_request.primitive.requestPrimitive, p_primitiveContent)){
setverdict(pass, __SCOPE__ & ":INFO: Notification received"); setverdict(pass, __SCOPE__ & ":INFO: Notification received");
...@@ -1413,7 +1413,7 @@ module OneM2M_Functions { ...@@ -1413,7 +1413,7 @@ module OneM2M_Functions {
tc_ac.start; tc_ac.start;
alt { alt {
[] mcaPortIn.receive(mw_request(mw_aggregatedNotifyBase)) -> value vc_request { [] mcaPortIn.receive(mw_request(mw_notifyAggregatedNotification)) -> value vc_request {
tc_ac.stop; tc_ac.stop;
if(p_numberOfAggregatedNotification == lengthof(vc_request.primitive.requestPrimitive.primitiveContent.aggregatedNotification.notification_list)){ if(p_numberOfAggregatedNotification == lengthof(vc_request.primitive.requestPrimitive.primitiveContent.aggregatedNotification.notification_list)){
if(f_check_notificationContent(vc_response.primitive.requestPrimitive, p_primitiveContent)){ if(f_check_notificationContent(vc_response.primitive.requestPrimitive, p_primitiveContent)){
...@@ -1431,7 +1431,7 @@ module OneM2M_Functions { ...@@ -1431,7 +1431,7 @@ module OneM2M_Functions {
v_responsePrimitive.requestIdentifier := vc_request.primitive.requestPrimitive.requestIdentifier; v_responsePrimitive.requestIdentifier := vc_request.primitive.requestPrimitive.requestIdentifier;
mcaPortIn.send(m_response(v_responsePrimitive)); mcaPortIn.send(m_response(v_responsePrimitive));
} }
[] mcaPortIn.receive(mw_request(mw_notify(mw_contentNotification(?)))) -> value vc_request { [] mcaPortIn.receive(mw_request(mw_notifyNotification(mw_contentNotification(?)))) -> value vc_request {
tc_ac.stop; tc_ac.stop;
if(f_check_notificationContent(vc_request.primitive.requestPrimitive, p_primitiveContent)){ if(f_check_notificationContent(vc_request.primitive.requestPrimitive, p_primitiveContent)){
setverdict(pass, __SCOPE__ & ":INFO: Notification received"); setverdict(pass, __SCOPE__ & ":INFO: Notification received");
...@@ -1469,7 +1469,7 @@ module OneM2M_Functions { ...@@ -1469,7 +1469,7 @@ module OneM2M_Functions {
var ResponsePrimitive v_responsePrimitive; var ResponsePrimitive v_responsePrimitive;
tc_ac.start; tc_ac.start;
alt { alt {
[] mcaPortIn.receive(mw_request(mw_notify(p_notification))) -> value vc_request { [] mcaPortIn.receive(mw_request(mw_notifyNotification(p_notification))) -> value vc_request {
tc_ac.stop; tc_ac.stop;
v_responsePrimitive := valueof(m_responseNotification(int2001, omit)); v_responsePrimitive := valueof(m_responseNotification(int2001, omit));
v_responsePrimitive.requestIdentifier := vc_request.primitive.requestPrimitive.requestIdentifier; v_responsePrimitive.requestIdentifier := vc_request.primitive.requestPrimitive.requestIdentifier;
...@@ -1498,7 +1498,7 @@ module OneM2M_Functions { ...@@ -1498,7 +1498,7 @@ module OneM2M_Functions {
tc_ac.start(10.0); tc_ac.start(10.0);
alt { alt {
[] mcaPortIn.receive(mw_request(mw_notify(mw_contentNotification(?)))) -> value vc_request { [] mcaPortIn.receive(mw_request(mw_notifyNotification(mw_contentNotification(?)))) -> value vc_request {
tc_ac.stop; tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error, Non expected notification received"); setverdict(fail, __SCOPE__ & ": Error, Non expected notification received");
} }
...@@ -1582,7 +1582,7 @@ module OneM2M_Functions { ...@@ -1582,7 +1582,7 @@ module OneM2M_Functions {
tc_ac.start; tc_ac.start;
alt { alt {
[] mccPortIn.receive(mw_request(mw_notify(v_notificationRequest))) -> value vc_request { [] mccPortIn.receive(mw_request(mw_notifyNotification(v_notificationRequest))) -> value vc_request {
tc_ac.stop; tc_ac.stop;
setverdict(pass, __SCOPE__ & ":INFO: Notification received"); setverdict(pass, __SCOPE__ & ":INFO: Notification received");
} }
...@@ -1617,7 +1617,7 @@ module OneM2M_Functions { ...@@ -1617,7 +1617,7 @@ module OneM2M_Functions {
function f_cse_isResourcePresent (integer p_resourceIndex) runs on CseSimu return boolean { function f_cse_isResourcePresent (integer p_resourceIndex) runs on CseSimu return boolean {
//Check to see if the resource is present or not //Check to see if the resource is present or not
mccPort.send(m_request(m_retrieveResource(f_getResourceAddress(p_resourceIndex), f_getOriginator(p_resourceIndex)))); mccPort.send(m_request(m_retrieve(f_getResourceAddress(p_resourceIndex), f_getOriginator(p_resourceIndex))));
tc_ac.start; tc_ac.start;
alt { alt {
[] mccPort.receive(mw_response(mw_responsePrimitive(int2000))) { [] mccPort.receive(mw_response(mw_responsePrimitive(int2000))) {
...@@ -1851,7 +1851,7 @@ module OneM2M_Functions { ...@@ -1851,7 +1851,7 @@ module OneM2M_Functions {
var MsgIn v_request; var MsgIn v_request;
var ResponsePrimitive v_responsePrimitive; var ResponsePrimitive v_responsePrimitive;
[] mcaPortIn.receive(mw_request(mw_notify(mw_contentNotification(?)))) -> value v_request { [] mcaPortIn.receive(mw_request(mw_notifyNotification(mw_contentNotification(?)))) -> value v_request {
//Send response //Send response
v_responsePrimitive := valueof(m_responseNotification(int2001, omit)); v_responsePrimitive := valueof(m_responseNotification(int2001, omit));
v_responsePrimitive.requestIdentifier := v_request.primitive.requestPrimitive.requestIdentifier; v_responsePrimitive.requestIdentifier := v_request.primitive.requestPrimitive.requestIdentifier;
......
This diff is collapsed.
...@@ -450,7 +450,7 @@ module OneM2M_Testcases_AE { ...@@ -450,7 +450,7 @@ module OneM2M_Testcases_AE {
tc_ac.start; tc_ac.start;
alt { alt {
[] mcaPortIn.receive(mw_request(mw_retrieveResource(v_utRequest.to_))) { [] mcaPortIn.receive(mw_request(mw_retrieve(v_utRequest.to_))) {
tc_ac.stop; tc_ac.stop;
setverdict(pass, __SCOPE__, " : Container retrieve request received successfuly"); setverdict(pass, __SCOPE__, " : Container retrieve request received successfuly");
...@@ -538,7 +538,7 @@ module OneM2M_Testcases_AE { ...@@ -538,7 +538,7 @@ module OneM2M_Testcases_AE {
tc_ac.start; tc_ac.start;
alt { alt {
[] mcaPortIn.receive(mw_request(mw_retrieveResource(v_utRequest.to_))) { [] mcaPortIn.receive(mw_request(mw_retrieve(v_utRequest.to_))) {
tc_ac.stop; tc_ac.stop;
setverdict(pass, __SCOPE__, " : Container retrieve request received successfuly"); setverdict(pass, __SCOPE__, " : Container retrieve request received successfuly");
...@@ -630,7 +630,7 @@ module OneM2M_Testcases_AE { ...@@ -630,7 +630,7 @@ module OneM2M_Testcases_AE {
tc_ac.start; tc_ac.start;
alt { alt {
[] mcaPortIn.receive(mw_request(mw_deleteRequest(v_utRequest.to_))) { [] mcaPortIn.receive(mw_request(mw_delete(v_utRequest.to_))) {
tc_ac.stop; tc_ac.stop;
setverdict(pass, __SCOPE__, " : Container update request received successfuly"); setverdict(pass, __SCOPE__, " : Container update request received successfuly");
...@@ -718,7 +718,7 @@ module OneM2M_Testcases_AE { ...@@ -718,7 +718,7 @@ module OneM2M_Testcases_AE {
tc_ac.start; tc_ac.start;
alt { alt {
[] mcaPortIn.receive(mw_request(mw_deleteRequest(v_utRequest.to_))) { [] mcaPortIn.receive(mw_request(mw_delete(v_utRequest.to_))) {
tc_ac.stop; tc_ac.stop;
setverdict(pass, __SCOPE__, " : Container update request received successfuly"); setverdict(pass, __SCOPE__, " : Container update request received successfuly");
...@@ -957,7 +957,7 @@ module OneM2M_Testcases_AE { ...@@ -957,7 +957,7 @@ module OneM2M_Testcases_AE {
var charstring v_action := __SCOPE__ & ": Please, send a valid AE DELETE Registration Request"; var charstring v_action := __SCOPE__ & ": Please, send a valid AE DELETE Registration Request";
//primitives for utPort //primitives for utPort
var template UtTriggerPrimitive v_utRequest := mw_deleteRequest; var template UtTriggerPrimitive v_utRequest := mw_delete;
f_cf03Up(); f_cf03Up();
...@@ -966,7 +966,7 @@ module OneM2M_Testcases_AE { ...@@ -966,7 +966,7 @@ module OneM2M_Testcases_AE {
//Test behavior //Test behavior
tc_ac.start; tc_ac.start;
alt{ alt{
[] mcaPortIn.receive(mw_request(mw_deleteRequest)) -> value v_request { [] mcaPortIn.receive(mw_request(mw_delete)) -> value v_request {
tc_ac.stop; tc_ac.stop;
setverdict(pass, __SCOPE__, " : AE deregistration request is accepted!"); setverdict(pass, __SCOPE__, " : AE deregistration request is accepted!");
...@@ -1635,7 +1635,7 @@ module OneM2M_Testcases_AE { ...@@ -1635,7 +1635,7 @@ module OneM2M_Testcases_AE {
//Test behavior //Test behavior
tc_ac.start; tc_ac.start;
alt{ alt{
[] mcaPortIn.receive(mw_request(mw_retrieveResource(p_address))) -> value v_request { [] mcaPortIn.receive(mw_request(mw_retrieve(p_address))) -> value v_request {
tc_ac.stop; tc_ac.stop;
setverdict(pass, __SCOPE__, " : retrieve ressource type " & int2str(enum2int(v_request.primitive.requestPrimitive.resourceType)) & " request is accepted!!"); setverdict(pass, __SCOPE__, " : retrieve ressource type " & int2str(enum2int(v_request.primitive.requestPrimitive.resourceType)) & " request is accepted!!");
...@@ -1685,7 +1685,7 @@ module OneM2M_Testcases_AE { ...@@ -1685,7 +1685,7 @@ module OneM2M_Testcases_AE {
//Test behavior //Test behavior
tc_ac.start; tc_ac.start;
alt{ alt{
[] mcaPortIn.receive(mw_request(mw_retrieveResource(v_address & "/" & c_resourceShortNameOldest))) -> value v_request { [] mcaPortIn.receive(mw_request(mw_retrieve(v_address & "/" & c_resourceShortNameOldest))) -> value v_request {
tc_ac.stop; tc_ac.stop;
setverdict(pass, __SCOPE__, " : retrieve attribute oldest request is accepted!"); setverdict(pass, __SCOPE__, " : retrieve attribute oldest request is accepted!");
...@@ -1733,7 +1733,7 @@ module OneM2M_Testcases_AE { ...@@ -1733,7 +1733,7 @@ module OneM2M_Testcases_AE {
//Test behavior //Test behavior
tc_ac.start; tc_ac.start;
alt{ alt{
[] mcaPortIn.receive(mw_request(mw_retrieveResource(v_address & "/" & c_resourceShortNameLatest))) -> value v_request { [] mcaPortIn.receive(mw_request(mw_retrieve(v_address & "/" & c_resourceShortNameLatest))) -> value v_request {
tc_ac.stop; tc_ac.stop;
setverdict(pass, __SCOPE__, " : retrieve attribute latest request is accepted!!"); setverdict(pass, __SCOPE__, " : retrieve attribute latest request is accepted!!");
...@@ -1782,7 +1782,7 @@ module OneM2M_Testcases_AE { ...@@ -1782,7 +1782,7 @@ module OneM2M_Testcases_AE {
//Test behavior //Test behavior
tc_ac.start; tc_ac.start;
alt{ alt{
[] mcaPortIn.receive(mw_request(mw_retrieveResource(v_address))) -> value v_request { [] mcaPortIn.receive(mw_request(mw_retrieve(v_address))) -> value v_request {
tc_ac.stop; tc_ac.stop;
setverdict(pass, __SCOPE__, " : retrieve ressource type " & int2str(enum2int(v_request.primitive.requestPrimitive.resourceType)) & " request is accepted!!"); setverdict(pass, __SCOPE__, " : retrieve ressource type " & int2str(enum2int(v_request.primitive.requestPrimitive.resourceType)) & " request is accepted!!");
...@@ -1831,7 +1831,7 @@ module OneM2M_Testcases_AE { ...@@ -1831,7 +1831,7 @@ module OneM2M_Testcases_AE {
//Test behavior //Test behavior
tc_ac.start; tc_ac.start;
alt{ alt{
[] mcaPortIn.receive(mw_request(mw_retrieveResource(v_address))) -> value v_request { [] mcaPortIn.receive(mw_request(mw_retrieve(v_address))) -> value v_request {
tc_ac.stop; tc_ac.stop;
setverdict(pass, __SCOPE__, " : retrieve ressource type " & int2str(enum2int(v_request.primitive.requestPrimitive.resourceType)) & " request is accepted!!"); setverdict(pass, __SCOPE__, " : retrieve ressource type " & int2str(enum2int(v_request.primitive.requestPrimitive.resourceType)) & " request is accepted!!");
...@@ -1883,7 +1883,7 @@ module OneM2M_Testcases_AE { ...@@ -1883,7 +1883,7 @@ module OneM2M_Testcases_AE {
//Test behavior //Test behavior
tc_ac.start; tc_ac.start;
alt{ alt{
[] mcaPortIn.receive(mw_request(mw_deleteRequest(v_address & "/" & c_resourceShortNameOldest))) -> value v_request { [] mcaPortIn.receive(mw_request(mw_delete(v_address & "/" & c_resourceShortNameOldest))) -> value v_request {
tc_ac.stop; tc_ac.stop;
setverdict(pass, __SCOPE__, " : delete attribute oldest request is accepted!!"); setverdict(pass, __SCOPE__, " : delete attribute oldest request is accepted!!");
...@@ -1931,7 +1931,7 @@ module OneM2M_Testcases_AE { ...@@ -1931,7 +1931,7 @@ module OneM2M_Testcases_AE {
//Test behavior //Test behavior
tc_ac.start; tc_ac.start;
alt{ alt{
[] mcaPortIn.receive(mw_request(mw_deleteRequest(v_address & "/" & c_resourceShortNameLatest))) -> value v_request { [] mcaPortIn.receive(mw_request(mw_delete(v_address & "/" & c_resourceShortNameLatest))) -> value v_request {
tc_ac.stop; tc_ac.stop;
setverdict(pass, __SCOPE__, " : delete attribute latest request is accepted!!"); setverdict(pass, __SCOPE__, " : delete attribute latest request is accepted!!");
...@@ -1980,7 +1980,7 @@ module OneM2M_Testcases_AE { ...@@ -1980,7 +1980,7 @@ module OneM2M_Testcases_AE {
//Test behavior //Test behavior
tc_ac.start; tc_ac.start;
alt{ alt{
[] mcaPortIn.receive(mw_request(mw_deleteRequest(v_address))) -> value v_request { [] mcaPortIn.receive(mw_request(mw_delete(v_address))) -> value v_request {
tc_ac.stop; tc_ac.stop;
setverdict(pass, __SCOPE__, " : delete ressource type " & int2str(enum2int(v_request.primitive.requestPrimitive.resourceType)) & " request is accepted!!"); setverdict(pass, __SCOPE__, " : delete ressource type " & int2str(enum2int(v_request.primitive.requestPrimitive.resourceType)) & " request is accepted!!");
...@@ -2029,7 +2029,7 @@ module OneM2M_Testcases_AE { ...@@ -2029,7 +2029,7 @@ module OneM2M_Testcases_AE {
//Test behavior //Test behavior
tc_ac.start; tc_ac.start;
alt{ alt{
[] mcaPortIn.receive(mw_request(mw_deleteRequest(v_address))) -> value v_request { [] mcaPortIn.receive(mw_request(mw_delete(v_address))) -> value v_request {
tc_ac.stop; tc_ac.stop;
setverdict(pass, __SCOPE__, " : delete ressource type " & int2str(enum2int(v_request.primitive.requestPrimitive.resourceType)) & " request is accepted!!"); setverdict(pass, __SCOPE__, " : delete ressource type " & int2str(enum2int(v_request.primitive.requestPrimitive.resourceType)) & " request is accepted!!");
...@@ -2346,7 +2346,7 @@ module OneM2M_Testcases_AE { ...@@ -2346,7 +2346,7 @@ module OneM2M_Testcases_AE {
//Test behavior //Test behavior
mcaPortIn.send(m_request(m_notifyRequest)); mcaPortIn.send(m_request(m_notify));
tc_ac.start; tc_ac.start;
alt{ alt{
...@@ -2437,7 +2437,7 @@ module OneM2M_Testcases_AE { ...@@ -2437,7 +2437,7 @@ module OneM2M_Testcases_AE {
//Test behavior //Test behavior
mcaPortIn.send(m_request(m_notifyAggregatedRequest)); mcaPortIn.send(m_request(m_notifyAggregatedNotification));
tc_ac.start; tc_ac.start;
alt{ alt{
......
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