- Small fix in f_cse_postamble_ae function

- Updated comments in f_cse_notifyProcedure_updateHandler function
- New PICS PICS_ASN_CSE created
- New template m_retrieveFilterCriteria
- New template m_filterCriteria
- New parameter in template mw_createAEAnnc
- New parameter in template mw_contentCreateAEAnnc
- Fixed f_CSE_DIS_008 Test Case
- Implemented TC_CSE_REG_CRE_006 Test Case
- Implemented TC_CSE_REG_CRE_007 Test Case
- Small fix in TC_CSE_REG_CRE_008 Test Case
- Small fix in TC_CSE_REG_CRE_010 Test Case
- Small fix in TC_CSE_REG_CRE_020 Test Case
- Small fix in TC_CSE_DIS_007 Test Case
- Small fix in TC_CSE_DIS_008_CRB_CRA Test Case
- Small fix in TC_CSE_DIS_008_MS_US Test Case
- Small fix in TC_CSE_DIS_008_STS_STB Test Case
- Small fix in TC_CSE_DIS_008_EXB_EXA Test Case
Signed-off-by: Antonio Castillo Verdugo's avataracverdugo <acverdugo@at4wireless.com>
parent 988faa84
...@@ -746,7 +746,8 @@ module OneM2M_Functions { ...@@ -746,7 +746,8 @@ module OneM2M_Functions {
if(p_ae.running) { if(p_ae.running) {
p_ae.stop; p_ae.stop;
} }
p_ae.start(f_cse_postamble_deleteResources()); p_ae.start(f_cse_postamble_deleteResources());
p_ae.done;
} }
/** /**
...@@ -1567,15 +1568,13 @@ module OneM2M_Functions { ...@@ -1567,15 +1568,13 @@ module OneM2M_Functions {
/** /**
* @desc Handling message exchange for the AE Annc update * @desc Handling message exchange for the AE Annc update
* @param p_responseStatusCode Response Status Code to be used for the response to the AE Annc request
* @verdict * @verdict
*/ */
//TODO TO BE FINALIZED //TODO TO BE FINALIZED
function f_cse_notifyProcedure_updateHandler() runs on CseSimu { function f_cse_notifyProcedure_updateHandler() runs on CseSimu {
// Local variables // Local variables
var ResponsePrimitive v_responsePrimitive; var ResponsePrimitive v_responsePrimitive;
var template Notification v_notificationRequest := mw_contentNotification_any; var template Notification v_notificationRequest := mw_contentNotification_any;
//Preparation of Notification response to be sent //Preparation of Notification response to be sent
v_responsePrimitive := valueof(m_responseNotification(int2004, omit)); v_responsePrimitive := valueof(m_responseNotification(int2004, omit));
......
...@@ -19,7 +19,8 @@ module OneM2M_Pics { ...@@ -19,7 +19,8 @@ module OneM2M_Pics {
*/ */
modulepar boolean PICS_ACP_SUPPORT := true; modulepar boolean PICS_ACP_SUPPORT := true;
modulepar boolean PICS_IN_CSE := true; modulepar boolean PICS_IN_CSE := true;
modulepar boolean PICS_MN_CSE := true; modulepar boolean PICS_MN_CSE := true;
modulepar boolean PICS_ASN_CSE := true;
modulepar boolean PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT := true; modulepar boolean PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT := true;
modulepar boolean PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT := true; modulepar boolean PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT := true;
......
...@@ -230,6 +230,17 @@ module OneM2M_Templates { ...@@ -230,6 +230,17 @@ module OneM2M_Templates {
} }
}; };
/**
* @desc RETRIEVE request primtive containing the Filter Criteria in the filterCriteria field
* @param p_targetResourceAddress Target resource address
* @param p_filterCriteria FilterCriteria
* @param p_originator Originator (from)
*/
template (value) RequestPrimitive m_retrieveFilterCriteria(XSD.ID p_targetResourceAddress, in XSD.ID p_originator, in template (value) FilterCriteria p_filterCriteria) modifies m_retrieve := {
requestIdentifier := "m_retrieveResourceFilterUsageOption" & f_rnd(1, 1000000),
filterCriteria := p_filterCriteria
};
/** /**
* @desc RETRIEVE request primtive containing the Filter Criteria in the filterCriteria field * @desc RETRIEVE request primtive containing the Filter Criteria in the filterCriteria field
* @param p_targetResourceAddress Target resource address * @param p_targetResourceAddress Target resource address
...@@ -289,32 +300,56 @@ module OneM2M_Templates { ...@@ -289,32 +300,56 @@ module OneM2M_Templates {
}; };
/** /**
* @desc RETRIEVE request primtive containing the Discovery Type in the discoveryResultType field and Filter Criteria in the filterCriteria field * @desc RETRIEVE request primtive containing the Discovery Type in the discoveryResultType field and Filter Criteria in the filterCriteria field
* @param p_targetResourceAddress Target resource address * @param p_targetResourceAddress Target resource address
* @param p_filterCriteria FilterCriteria * @param p_filterCriteria FilterCriteria
* @param p_originator Originator (from) * @param p_originator Originator (from)
*/ */
template (value) RequestPrimitive m_retrieveInvalidFormatOption(XSD.ID p_targetResourceAddress, in XSD.ID p_originator) modifies m_retrieve := { template (value) RequestPrimitive m_retrieveInvalidFormatOption(XSD.ID p_targetResourceAddress, in XSD.ID p_originator) modifies m_retrieve := {
requestIdentifier := "m_retrieveResourceFilterUsageOption" & f_rnd(1, 1000000), requestIdentifier := "m_retrieveResourceFilterUsageOption" & f_rnd(1, 1000000),
filterCriteria := { filterCriteria := {
createdBefore := omit, createdBefore := omit,
createdAfter := omit, createdAfter := omit,
modifiedSince := omit, modifiedSince := omit,
unmodifiedSince := omit, unmodifiedSince := omit,
stateTagSmaller := omit, stateTagSmaller := omit,
stateTagBigger := omit, stateTagBigger := omit,
expireBefore := omit, expireBefore := omit,
expireAfter := omit, expireAfter := omit,
labels := omit, labels := omit,
resourceType := omit, resourceType := omit,
sizeAbove := omit, sizeAbove := omit,
sizeBelow := omit, sizeBelow := omit,
contentType_list := {}, contentType_list := {},
attribute_list := {}, attribute_list := {},
filterUsage := omit, filterUsage := omit,
limit := omit limit := omit
} }
}; };
/**
* @desc FilterCriteria empty template
*/
template (value) FilterCriteria m_filterCriteria := {
createdBefore := omit,
createdAfter := omit,
modifiedSince := omit,
unmodifiedSince := omit,
stateTagSmaller := omit,
stateTagBigger := omit,
expireBefore := omit,
expireAfter := omit,
labels := omit,
resourceType := omit,
sizeAbove := omit,
sizeBelow := omit,
contentType_list := {},
attribute_list := {},
filterUsage := omit,
limit := omit
}
}//end group Retrieve }//end group Retrieve
...@@ -556,7 +591,7 @@ module OneM2M_Templates { ...@@ -556,7 +591,7 @@ module OneM2M_Templates {
/** /**
* @desc Reception template for CREATE AEAnnc * @desc Reception template for CREATE AEAnnc
*/ */
template RequestPrimitive mw_createAEAnnc(template (omit) XSD.ID p_from := omit, template (omit) XSD.ID p_to := omit, template (omit) AcpType p_accessControlPolicyIds := omit) modifies mw_create := { template RequestPrimitive mw_createAEAnnc(template (omit) XSD.ID p_from := omit, template (omit) XSD.ID p_to := omit, template (omit) AcpType p_accessControlPolicyIds := omit, template XSD.AnyURI p_link := ?) modifies mw_create := {
resourceType := int10002, resourceType := int10002,
primitiveContent := {aEAnnc := mw_contentCreateAEAnnc({"Credential-ID:None"}, p_accessControlPolicyIds)} primitiveContent := {aEAnnc := mw_contentCreateAEAnnc({"Credential-ID:None"}, p_accessControlPolicyIds)}
}; };
...@@ -1240,7 +1275,7 @@ module OneM2M_Templates { ...@@ -1240,7 +1275,7 @@ module OneM2M_Templates {
* @param p_appId App ID * @param p_appId App ID
* @param p_nodeLink Node link * @param p_nodeLink Node link
*/ */
template AEAnnc_optional mw_contentCreateAEAnnc (in template Labels p_labels := ?, in template AcpType p_accessControlPolicyIds := ?) := { template AEAnnc_optional mw_contentCreateAEAnnc (in template Labels p_labels := ?, in template AcpType p_accessControlPolicyIds := ?, template XSD.AnyURI p_link := ?) := {
resourceName := omit,//NA M resourceName := omit,//NA M
resourceType := omit,//NA M resourceType := omit,//NA M
resourceID := omit,//NA M resourceID := omit,//NA M
...@@ -1250,7 +1285,7 @@ module OneM2M_Templates { ...@@ -1250,7 +1285,7 @@ module OneM2M_Templates {
labels := p_labels,//MA labels := p_labels,//MA
accessControlPolicyIDs := p_accessControlPolicyIds,//MA accessControlPolicyIDs := p_accessControlPolicyIds,//MA
expirationTime := ?,//MA M expirationTime := ?,//MA M
link := ?,//M link := p_link,//M
appName := omit,//OA appName := omit,//OA
app_ID := omit,//OA app_ID := omit,//OA
aE_ID := omit,//OA aE_ID := omit,//OA
......
This diff is collapsed.
...@@ -84,7 +84,7 @@ module OneM2M_TestControl_MN_profile { ...@@ -84,7 +84,7 @@ module OneM2M_TestControl_MN_profile {
if(true) {execute (TC_CSE_REG_RET_004_POA());} if(true) {execute (TC_CSE_REG_RET_004_POA());}
if(true) {execute (TC_CSE_DMR_UPD_015_AE_POA());} if(true) {execute (TC_CSE_DMR_UPD_015_AE_POA());}
if(true) {execute (TC_CSE_REG_CRE_002());} if(true) {execute (TC_CSE_REG_CRE_002());}
if(true) {execute (TC_CSE_REG_CRE_003());} //if(true) {execute (TC_CSE_REG_CRE_003());} //TO BE IMPLEMENTED
if(true) {execute (TC_CSE_REG_CRE_020());} if(true) {execute (TC_CSE_REG_CRE_020());}
//CE_REG_00004 //CE_REG_00004
......
...@@ -604,6 +604,118 @@ module OneM2M_Testcases_CSE_Release_1 { ...@@ -604,6 +604,118 @@ module OneM2M_Testcases_CSE_Release_1 {
f_cf02DownCseSimuMaster(); f_cf02DownCseSimuMaster();
} }
/**
* @desc Check that the IUT accepts a create request of <AE> resource with attributes multiplicity equals to 1 and provided character ‘S’ in AE_ID_Stem ask for a SP_relative_AE_ID
*
*/
testcase TC_CSE_REG_CRE_006() runs on InCseSimu system CseSystem {
var RequestPrimitive v_request;
var integer v_cseBaseIndex := -1;
var ResourceType v_resourceType := int2;
//Test control
if(not(PICS_MN_CSE or PICS_ASN_CSE)) {
setverdict(inconc, __SCOPE__ & ": IUT shall be MN-CSE or ASN-CSE to run this test case");
stop;
}
// Test component configuration
f_cf02UpCseSimuMaster();
//Preambule
vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSE);
//Test Body
vc_ae1.start(f_cse_createResource(int2, m_createAe(PX_APP_ID, omit, "S")));
vc_ae1.done;
tc_ac.start;
alt {
[] mccPortIn.receive(mw_request(mw_createAEAnnc(PX_CSE_ID, f_getLocalResourceAddress(vc_cSEBaseIndex), -, "S"))) {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": AE creation redirected.");
}
[] mccPortIn.receive {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error while creating AE");
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while creating AE");
}
}
// Postamble
f_cse_postamble_deleteResourcesCSE();
// Tear down
f_cf02DownCseSimuMaster();
} // end of TC_CSE_REG_CRE_006
/**
* @desc Check that the IUT accepts a create request of <AE> resource with attributes multiplicity equals to 1 and provided character ‘S’ in AE_ID_Stem ask for a SP_relative_AE_ID
*
*/
testcase TC_CSE_REG_CRE_007() runs on AeSimu system CseSystem{
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_aeIndex := -1;
//Test control
if(not(PICS_MN_CSE)) {
setverdict(inconc, __SCOPE__ & ": IUT shall be MN-CSE to run this test case");
stop;
}
// Test component configuration
f_cf02Up();
//Preambule
vc_cse1.start(f_cse_registrationRemoteCse(mw_createRemoteCSE));
vc_cse1.done;
v_aeIndex := f_cse_createResource(int2, m_createAe(PX_APP_ID, omit, "S"));
vc_cse1.start(f_cse_resourceAnnouncementHandler());
vc_cse1.done;
//Test Body
tc_ac.start;
alt {
[] mcaPortIn.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response {
tc_ac.stop;
//continue to test the content
if (ischosen(v_response.primitive.responsePrimitive.primitiveContent.aE)){
if (v_response.primitive.responsePrimitive.primitiveContent.aE.aE_ID == PX_APP_ID){
setverdict(pass, __SCOPE__ & ": AE creation success.");
}else{
setverdict(fail, __SCOPE__ & ": Error in AE content.");
}
}else{
setverdict(fail, __SCOPE__ & ": primitiveContent doesn't exist");
}
}
[] mcaPortIn.receive {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error while creating AE");
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while creating AE");
}
}
// Postamble
f_cse_postamble_deleteResources();
// Tear down
f_cf02Down();
} // end of TC_CSE_REG_CRE_007
/** /**
* @desc Check that the IUT accepts an AE re-registration (allowed M2M-SP-assigned AE-ID, S-AE-ID-STEM provided by AE), transfer request to the IN-CSE * @desc Check that the IUT accepts an AE re-registration (allowed M2M-SP-assigned AE-ID, S-AE-ID-STEM provided by AE), transfer request to the IN-CSE
...@@ -640,15 +752,15 @@ module OneM2M_Testcases_CSE_Release_1 { ...@@ -640,15 +752,15 @@ module OneM2M_Testcases_CSE_Release_1 {
tc_ac.start; tc_ac.start;
alt { alt {
[] mccPort.receive(mw_request(mw_createAEAnnc(f_getResourceAddress(-1,e_hierarchical, e_spRelative) & "/S", "CSE_ID", -))) { [] mccPortIn.receive(mw_request(mw_createAEAnnc(f_getResourceAddress(-1,e_hierarchical, e_spRelative) & "/S", "CSE_ID", -))) {
tc_ac.stop; tc_ac.stop;
setverdict(pass, __SCOPE__ & ": AE creation redirected."); setverdict(pass, __SCOPE__ & ": AE creation redirected.");
} }
[] mccPort.receive(mw_request(mw_createAEAnnc(f_getResourceAddress(-1,e_hierarchical, e_absolute) & "/S", "CSE_ID", -))) { [] mccPortIn.receive(mw_request(mw_createAEAnnc(f_getResourceAddress(-1,e_hierarchical, e_absolute) & "/S", "CSE_ID", -))) {
tc_ac.stop; tc_ac.stop;
setverdict(pass, __SCOPE__ & ": AE creation redirected."); setverdict(pass, __SCOPE__ & ": AE creation redirected.");
} }
[] mccPort.receive { [] mccPortIn.receive {
tc_ac.stop; tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error while creating AE"); setverdict(fail, __SCOPE__ & ": Error while creating AE");
} }
...@@ -770,7 +882,7 @@ module OneM2M_Testcases_CSE_Release_1 { ...@@ -770,7 +882,7 @@ module OneM2M_Testcases_CSE_Release_1 {
tc_ac.start; tc_ac.start;
alt { alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response { [] mcaPortIn.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response {
tc_ac.stop; tc_ac.stop;
//continue to test the content //continue to test the content
if (ischosen(v_response.primitive.responsePrimitive.primitiveContent.aE)){ if (ischosen(v_response.primitive.responsePrimitive.primitiveContent.aE)){
...@@ -783,7 +895,7 @@ module OneM2M_Testcases_CSE_Release_1 { ...@@ -783,7 +895,7 @@ module OneM2M_Testcases_CSE_Release_1 {
setverdict(fail, __SCOPE__ & ": primitiveContent doesn't exist"); setverdict(fail, __SCOPE__ & ": primitiveContent doesn't exist");
} }
} }
[] mcaPort.receive { [] mcaPortIn.receive {
tc_ac.stop; tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error while creating AE"); setverdict(fail, __SCOPE__ & ": Error while creating AE");
} }
...@@ -1154,8 +1266,8 @@ module OneM2M_Testcases_CSE_Release_1 { ...@@ -1154,8 +1266,8 @@ module OneM2M_Testcases_CSE_Release_1 {
var ResourceType v_resourceType := int2; var ResourceType v_resourceType := int2;
//Test control //Test control
if(not(PICS_MN_CSE)) { if(not(PICS_MN_CSE or PICS_ASN_CSE)) {
setverdict(inconc, __SCOPE__ & ": IUT shall be MN-CSE to run this test case"); setverdict(inconc, __SCOPE__ & ": IUT shall be MN-CSE or ASN-CSE to run this test case");
stop; stop;
} }
...@@ -9034,6 +9146,7 @@ module OneM2M_Testcases_CSE_Release_1 { ...@@ -9034,6 +9146,7 @@ module OneM2M_Testcases_CSE_Release_1 {
var RequestPrimitive v_request; var RequestPrimitive v_request;
var integer v_childResourceIndex := -1; var integer v_childResourceIndex := -1;
const ResourceType c_containerResourceType := int3; const ResourceType c_containerResourceType := int3;
var AttributeAux v_invalidAttribute;
// Test control // Test control
...@@ -9048,9 +9161,8 @@ module OneM2M_Testcases_CSE_Release_1 { ...@@ -9048,9 +9161,8 @@ module OneM2M_Testcases_CSE_Release_1 {
v_resourceIndex := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_aeIndex); v_resourceIndex := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_aeIndex);
v_childResourceIndex := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_resourceIndex); v_childResourceIndex := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_resourceIndex);
v_request := valueof(m_retrieveFilterUsageOption(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex), int1)); v_request := valueof(m_retrieveFilterUsageOption(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex), int1));
v_request.filterCriteria.expireBefore := "20171231T012345"; v_invalidAttribute := {name := "filterCriteria.sizeBelow", value_ := "-1"};
v_request.filterCriteria.expireAfter := "20181231T012345"; mcaPort.send(m_request(v_request, {v_invalidAttribute}));
mcaPort.send(m_request(v_request));
tc_ac.start; tc_ac.start;
alt { alt {
...@@ -9088,10 +9200,11 @@ module OneM2M_Testcases_CSE_Release_1 { ...@@ -9088,10 +9200,11 @@ module OneM2M_Testcases_CSE_Release_1 {
//Local variables //Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive; var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var FilterCriteria v_filterCriteria; var FilterCriteria v_filterCriteria := valueof(m_filterCriteria);
v_filterCriteria.createdBefore := "20171231T012345"; v_filterCriteria.createdBefore := "20171231T012345";
v_filterCriteria.createdAfter := "20181231T012345"; v_filterCriteria.createdAfter := "20181231T012345";
v_filterCriteria.filterUsage := int1;
v_ae1.start(f_CSE_DIS_008(v_filterCriteria)); v_ae1.start(f_CSE_DIS_008(v_filterCriteria));
v_ae1.done; v_ae1.done;
...@@ -9102,10 +9215,11 @@ module OneM2M_Testcases_CSE_Release_1 { ...@@ -9102,10 +9215,11 @@ module OneM2M_Testcases_CSE_Release_1 {
//Local variables //Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive; var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var FilterCriteria v_filterCriteria; var FilterCriteria v_filterCriteria := valueof(m_filterCriteria);
v_filterCriteria.unmodifiedSince := "20171231T012345"; v_filterCriteria.unmodifiedSince := "20171231T012345";
v_filterCriteria.modifiedSince := "20181231T012345"; v_filterCriteria.modifiedSince := "20181231T012345";
v_filterCriteria.filterUsage := int1;
v_ae1.start(f_CSE_DIS_008(v_filterCriteria)); v_ae1.start(f_CSE_DIS_008(v_filterCriteria));
v_ae1.done; v_ae1.done;
...@@ -9116,10 +9230,11 @@ module OneM2M_Testcases_CSE_Release_1 { ...@@ -9116,10 +9230,11 @@ module OneM2M_Testcases_CSE_Release_1 {
//Local variables //Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive; var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var FilterCriteria v_filterCriteria; var FilterCriteria v_filterCriteria := valueof(m_filterCriteria);
v_filterCriteria.stateTagSmaller := 1; v_filterCriteria.stateTagSmaller := 1;
v_filterCriteria.stateTagBigger := 2; v_filterCriteria.stateTagBigger := 2;
v_filterCriteria.filterUsage := int1;
v_ae1.start(f_CSE_DIS_008(v_filterCriteria)); v_ae1.start(f_CSE_DIS_008(v_filterCriteria));
v_ae1.done; v_ae1.done;
...@@ -9130,10 +9245,11 @@ module OneM2M_Testcases_CSE_Release_1 { ...@@ -9130,10 +9245,11 @@ module OneM2M_Testcases_CSE_Release_1 {
//Local variables //Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive; var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var FilterCriteria v_filterCriteria; var FilterCriteria v_filterCriteria := valueof(m_filterCriteria);
v_filterCriteria.expireBefore := "20171231T012345"; v_filterCriteria.expireBefore := "20171231T012345";
v_filterCriteria.expireAfter := "20181231T012345"; v_filterCriteria.expireAfter := "20181231T012345";
v_filterCriteria.filterUsage := int1;
v_ae1.start(f_CSE_DIS_008(v_filterCriteria)); v_ae1.start(f_CSE_DIS_008(v_filterCriteria));
v_ae1.done; v_ae1.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