Commit 5f2b1110 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Improvements and fixes for:


TC_CSE_REG_CRE_001
TC_CSE_REG_CRE_004
TC_CSE_REG_CRE_005
TC_CSE_REG_CRE_009
TC_CSE_REG_CRE_011
f_CSE_REG_CRE_013
TC_CSE_REG_CRE_016
TC_CSE_REG_CRE_023

New function for update procedure of announced resource
Signed-off-by: Miguel Angel Reina Ortega's avatarMiguel Angel Reina Ortega <miguelangel.reinaortega@etsi.org>
parent 51480bf1
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
module OneM2M_Functions { module OneM2M_Functions {
import from XSD all; import from XSD all;
import from LibCommon_Time all;
import from OneM2M_Templates all; import from OneM2M_Templates all;
import from OneM2M_Types all; import from OneM2M_Types all;
import from OneM2M_TypesAndValues all; import from OneM2M_TypesAndValues all;
...@@ -779,11 +780,9 @@ module OneM2M_Functions { ...@@ -779,11 +780,9 @@ module OneM2M_Functions {
for(i := lengthof(vc_resourcesIndexToBeDeleted) -1; i >=0; i := i - 1) { for(i := lengthof(vc_resourcesIndexToBeDeleted) -1; i >=0; i := i - 1) {
v_resourceAddress := f_getResourceAddress(vc_resourcesIndexToBeDeleted[i], e_nonHierarchical); v_resourceAddress := f_getResourceAddress(vc_resourcesIndexToBeDeleted[i]);
v_request := valueof(m_delete(v_resourceAddress, f_getOriginator(vc_resourcesIndexToBeDeleted[i],false))); v_request := valueof(m_delete(v_resourceAddress, f_getOriginator(vc_resourcesIndexToBeDeleted[i],false)));
v_request.from_ := PX_SUPER_CSE_ID;
mccPort.send(m_request(v_request)); mccPort.send(m_request(v_request));
...@@ -856,6 +855,37 @@ module OneM2M_Functions { ...@@ -856,6 +855,37 @@ module OneM2M_Functions {
return v_resourceIndex; return v_resourceIndex;
} }
/**
* @desc Message exchange for the update of an announced resource
* @param p_requestPrimitive UPDATE request primitive to be used
* @verdict
*/
function f_cse_updateAnnouncedResource(in RequestPrimitive p_requestPrimitive) runs on CseSimu {
mccPort.send(m_request(p_requestPrimitive));
tc_ac.start;
alt {
[] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response {
tc_ac.stop;
setverdict(pass, __SCOPE__&":INFO: Attribute of announced resource updated successfuly");
}
[] mccPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response {
tc_ac.stop;
setverdict(inconc, __SCOPE__&":INFO: Error while updating announced resource");
}
[] mccPort.receive{
tc_ac.stop;
setverdict(inconc, __SCOPE__&":INFO: Unexpected message received");
}
[] tc_ac.timeout {
setverdict(inconc, __SCOPE__&":INFO: No answer while updating announced resource");
}
}
f_checkCseSimuStatus();
}// end f_cse_updateAnnouncedResource
/** /**
* @desc Creation of the auxiliar ACP resource * @desc Creation of the auxiliar ACP resource
...@@ -1190,7 +1220,7 @@ module OneM2M_Functions { ...@@ -1190,7 +1220,7 @@ module OneM2M_Functions {
tc_ac.stop; tc_ac.stop;
setverdict(pass, __SCOPE__&":INFO: Resource type " & int2str(enum2int(p_resourceType)) & " created successfuly"); setverdict(pass, __SCOPE__&":INFO: Resource type " & int2str(enum2int(p_resourceType)) & " created successfuly");
f_checkAttributesToBeSaved(p_resourceType, v_request, vc_response.primitive.responsePrimitive); f_checkAttributesToBeSaved(p_resourceType, v_request, vc_response.primitive.responsePrimitive);
v_resourceIndex := f_setResource(vc_response.primitive.responsePrimitive.primitiveContent, p_resourceType, vc_remoteCseIndex); v_resourceIndex := f_setResource(vc_response.primitive.responsePrimitive.primitiveContent, f_getAnnouncedResourceType(p_resourceType), vc_remoteCseIndex);
} }
[] mccPort.receive(mw_response(mw_responsePrimitiveKO)) { [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) {
tc_ac.stop; tc_ac.stop;
...@@ -1770,7 +1800,7 @@ module OneM2M_Functions { ...@@ -1770,7 +1800,7 @@ module OneM2M_Functions {
v_response.primitiveContent.remoteCSE := vc_localResourcesList[vc_localRemoteCseIndex].resource.remoteCSE; v_response.primitiveContent.remoteCSE := vc_localResourcesList[vc_localRemoteCseIndex].resource.remoteCSE;
mccPortIn.send(m_response(v_response)); mccPortIn.send(m_response(v_response));
v_resourceIndex := f_setResource(m_primitiveContentRemoteCSE(m_contentMyRemoteCSEResource), int16, -1); v_resourceIndex := f_setResource(valueof(m_primitiveContentRemoteCSE(m_contentMyRemoteCSEResource)), int16, -1);
} }
[] mccPortIn.receive { [] mccPortIn.receive {
tc_ac.stop; tc_ac.stop;
...@@ -1782,6 +1812,9 @@ module OneM2M_Functions { ...@@ -1782,6 +1812,9 @@ module OneM2M_Functions {
} }
f_checkCseSimuStatus(); f_checkCseSimuStatus();
//In order for the IUT to perform some actions
f_sleep(10.0);
return v_resourceIndex; return v_resourceIndex;
...@@ -2213,7 +2246,7 @@ module OneM2M_Functions { ...@@ -2213,7 +2246,7 @@ module OneM2M_Functions {
p_request.requestIdentifier := valueof(p_request.requestIdentifier) & f_rnd(1, 1000000); p_request.requestIdentifier := valueof(p_request.requestIdentifier) & f_rnd(1, 1000000);
if(p_resourceType != int2) { if((p_resourceType != int2) and (p_resourceType != int10002)) {
if(p_resourceType == int16) { if(p_resourceType == int16) {
p_request.from_ := PX_CSE1_ID; p_request.from_ := PX_CSE1_ID;
} else { } else {
...@@ -2224,6 +2257,7 @@ module OneM2M_Functions { ...@@ -2224,6 +2257,7 @@ module OneM2M_Functions {
} }
} }
} }
p_request.to_ := f_getResourceAddress(p_parentIndex); p_request.to_ := f_getResourceAddress(p_parentIndex);
if (p_resourceType == int1) {//AccessControlPolicy if (p_resourceType == int1) {//AccessControlPolicy
...@@ -2348,9 +2382,15 @@ module OneM2M_Functions { ...@@ -2348,9 +2382,15 @@ module OneM2M_Functions {
p_request.requestIdentifier := valueof(p_request.requestIdentifier) & f_rnd(1, 1000000); p_request.requestIdentifier := valueof(p_request.requestIdentifier) & f_rnd(1, 1000000);
p_request.from_ := f_getOriginator(p_resourceIndex); if(p_resourceType != int10002) {
p_request.from_ := f_getOriginator(p_resourceIndex);
p_request.to_ := f_getResourceAddress(p_resourceIndex);
p_request.to_ := f_getResourceAddress(p_resourceIndex);
} else {
p_request.from_ := PX_CSE1_ID & "/" & f_getResourceId(vc_resourcesList[p_resourceIndex].resource);
p_request.to_ := f_getResourceAddress(p_resourceIndex, -, e_spRelative);
}
if (p_resourceType == int3) {//Container if (p_resourceType == int3) {//Container
...@@ -2410,6 +2450,9 @@ module OneM2M_Functions { ...@@ -2410,6 +2450,9 @@ module OneM2M_Functions {
if(ischosen(p_contentResource.aE)) { if(ischosen(p_contentResource.aE)) {
return f_resourceIdCleaner(p_contentResource.aE.resourceID); return f_resourceIdCleaner(p_contentResource.aE.resourceID);
} }
if(ischosen(p_contentResource.aEAnnc)) {
return f_resourceIdCleaner(p_contentResource.aEAnnc.resourceID);
}
if(ischosen(p_contentResource.serviceSubscribedAppRule)) { if(ischosen(p_contentResource.serviceSubscribedAppRule)) {
return f_resourceIdCleaner(p_contentResource.serviceSubscribedAppRule.resourceID); return f_resourceIdCleaner(p_contentResource.serviceSubscribedAppRule.resourceID);
} }
...@@ -2470,6 +2513,9 @@ module OneM2M_Functions { ...@@ -2470,6 +2513,9 @@ module OneM2M_Functions {
if(ischosen(p_contentResource.aE)) { if(ischosen(p_contentResource.aE)) {
return p_contentResource.aE.resourceName; return p_contentResource.aE.resourceName;
} }
if(ischosen(p_contentResource.aEAnnc)) {
return p_contentResource.aEAnnc.resourceName;
}
if(ischosen(p_contentResource.serviceSubscribedAppRule)) { if(ischosen(p_contentResource.serviceSubscribedAppRule)) {
return p_contentResource.serviceSubscribedAppRule.resourceName; return p_contentResource.serviceSubscribedAppRule.resourceName;
} }
......
...@@ -32,8 +32,7 @@ module OneM2M_Pics { ...@@ -32,8 +32,7 @@ module OneM2M_Pics {
modulepar boolean PICS_ACP_LBL := true; modulepar boolean PICS_ACP_LBL := true;
modulepar boolean PICS_ACP_AT := true; modulepar boolean PICS_ACP_AT := true;
modulepar boolean PICS_ACP_ET := true;
//AE optional attributes //AE optional attributes
modulepar boolean PICS_AE_LBL := true; modulepar boolean PICS_AE_LBL := true;
...@@ -98,7 +97,6 @@ module OneM2M_Pics { ...@@ -98,7 +97,6 @@ module OneM2M_Pics {
modulepar boolean PICS_SUB_NEC := true; modulepar boolean PICS_SUB_NEC := true;
modulepar boolean PICS_SUB_SU := true; modulepar boolean PICS_SUB_SU := true;
modulepar boolean PICS_SUB_LBL := true; modulepar boolean PICS_SUB_LBL := true;
modulepar boolean PICS_SUB_ET := true;
modulepar boolean PICS_SUB_GPI := true; modulepar boolean PICS_SUB_GPI := true;
modulepar boolean PICS_SUB_BN := true; modulepar boolean PICS_SUB_BN := true;
modulepar boolean PICS_SUB_RL := true; modulepar boolean PICS_SUB_RL := true;
......
...@@ -134,24 +134,11 @@ module OneM2M_Pixits { ...@@ -134,24 +134,11 @@ module OneM2M_Pixits {
group ExecutionParameters { group ExecutionParameters {
modulepar boolean PX_DELETE_CREATED_RESOURCES := true;
modulepar XSD.AnyURI PX_RESOURCE_TO_BE_DELETED := "/ae_test";
modulepar XSD.IDREFS PX_RESOURCES_TO_BE_DELETED := {"MyAe"}; modulepar XSD.IDREFS PX_RESOURCES_TO_BE_DELETED := {"MyAe"};
modulepar boolean PX_RUN_POSTAMBLE := true; modulepar boolean PX_RUN_POSTAMBLE := true;
} }
modulepar boolean PX_USE_RESOURCE_ID_AS_ORIGINATOR := true;
//for checking whether the locationPolicy creation request is originated from a ASN-AE //for checking whether the locationPolicy creation request is originated from a ASN-AE
//NOTE: Apply to Device-based location request, and this requires Test System (TS) to activate ASN-AE mode to test IUT //NOTE: Apply to Device-based location request, and this requires Test System (TS) to activate ASN-AE mode to test IUT
......
...@@ -407,7 +407,6 @@ module OneM2M_Templates { ...@@ -407,7 +407,6 @@ module OneM2M_Templates {
requestIdentifier := "m_updateAe", requestIdentifier := "m_updateAe",
primitiveContent:= {aE := m_contentUpdateAe} primitiveContent:= {aE := m_contentUpdateAe}
}; };
/** /**
* @desc Reception template for update Ae resource * @desc Reception template for update Ae resource
...@@ -511,15 +510,10 @@ module OneM2M_Templates { ...@@ -511,15 +510,10 @@ module OneM2M_Templates {
primitiveContent := {remoteCSE := m_contentUpdateRemoteCSE} primitiveContent := {remoteCSE := m_contentUpdateRemoteCSE}
} }
template (value) RequestPrimitive m_updateAE modifies m_update := { template (value) RequestPrimitive m_updateAEAnncBase modifies m_update:= {
requestIdentifier := "m_updateAE",
primitiveContent := {aE := m_contentUpdateAe}
}
template (value) RequestPrimitive m_updateAEAnnc(template (omit) AcpType p_accessControlPolicyIds := omit, template (omit) XSD.ID p_to := omit, template (omit) XSD.ID p_from := omit, XSD.ID p_appId, XSD.ID p_stemId := "") modifies m_update:= {
requestIdentifier := testcasename() & "-m_updateAEAnnc", requestIdentifier := testcasename() & "-m_updateAEAnnc",
resourceType := int10002, resourceType := int10002,
primitiveContent := {aEAnnc := m_contentUpdateAEAnnc(p_appId,p_stemId)} primitiveContent := {aEAnnc := m_contentUpdateAEAnnc}
}; };
}//end group Update }//end group Update
...@@ -1255,7 +1249,7 @@ module OneM2M_Templates { ...@@ -1255,7 +1249,7 @@ module OneM2M_Templates {
lastModifiedTime := omit,//NP lastModifiedTime := omit,//NP
labels := p_labels,//O labels := p_labels,//O
accessControlPolicyIDs := p_accessControlPolicyIds,//O accessControlPolicyIDs := p_accessControlPolicyIds,//O
expirationTime := omit,//O expirationTime := "20301231T012345",//O
link := p_link,//M TODO Put the right value link := p_link,//M TODO Put the right value
appName := omit,//O appName := omit,//O
app_ID := p_appId,//M app_ID := p_appId,//M
...@@ -2398,7 +2392,7 @@ module OneM2M_Templates { ...@@ -2398,7 +2392,7 @@ module OneM2M_Templates {
choice := omit choice := omit
} }
template (value) AEAnnc_optional m_contentUpdateAEAnnc (template (omit) XSD.ID p_appId := omit, template (omit) XSD.ID p_stemId := omit) := { template (value) AEAnnc_optional m_contentUpdateAEAnnc := {
resourceName := omit, resourceName := omit,
resourceType := omit, resourceType := omit,
resourceID := omit, resourceID := omit,
...@@ -2410,7 +2404,7 @@ module OneM2M_Templates { ...@@ -2410,7 +2404,7 @@ module OneM2M_Templates {
expirationTime := omit, expirationTime := omit,
link := omit, link := omit,
appName := omit, appName := omit,
app_ID := p_appId, app_ID := omit,
aE_ID := omit, aE_ID := omit,
pointOfAccess := omit, pointOfAccess := omit,
ontologyRef := omit, ontologyRef := omit,
...@@ -2870,6 +2864,7 @@ module OneM2M_Templates { ...@@ -2870,6 +2864,7 @@ module OneM2M_Templates {
template RemoteCSE_optional m_contentMyRemoteCSEResource modifies m_contentRemoteCSE_allOmit := { template RemoteCSE_optional m_contentMyRemoteCSEResource modifies m_contentRemoteCSE_allOmit := {
resourceName := PX_CSE1_NAME,//M resourceName := PX_CSE1_NAME,//M
resourceType := int16,//M resourceType := int16,//M
resourceID := PX_CSE1_RESOURCE_ID,//M
pointOfAccess := {PX_CSE1_ADDRESS},//O pointOfAccess := {PX_CSE1_ADDRESS},//O
cSEBase := PX_CSE1_NAME,//M cSEBase := PX_CSE1_NAME,//M
cSE_ID := PX_CSE1_ID,//M cSE_ID := PX_CSE1_ID,//M
......
...@@ -1329,17 +1329,17 @@ module OneM2M_PermutationFunctions { ...@@ -1329,17 +1329,17 @@ module OneM2M_PermutationFunctions {
[] mccPort.receive(mw_response(mw_responsePrimitive(int2001, f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response { [] mccPort.receive(mw_response(mw_responsePrimitive(int2001, f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response {
tc_ac.stop; tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Accepted creation for resource type remoteCSE containing attribute " & p_optionalAttribute.name); setverdict(pass, __SCOPE__ & ": Accepted creation for resource type remoteCSE containing attribute " & p_optionalAttribute.name);
f_setResource(v_request.primitiveContent,int16); f_setResource(v_response.primitive.responsePrimitive.primitiveContent,int16);
} }
[] mccPort.receive(mw_response(mw_responsePrimitiveOK(f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response { [] mccPort.receive(mw_response(mw_responsePrimitiveOK(f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response {
tc_ac.stop; tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code in the response"); setverdict(fail, __SCOPE__ & ": Wrong response status code in the response");
f_setResource(v_request.primitiveContent,int16); f_setResource(v_response.primitive.responsePrimitive.primitiveContent,int16);
} }
[] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { [] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop; tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Accepted creation for resource type remoteCSE without containing attribute " & p_optionalAttribute.name); setverdict(fail, __SCOPE__ & ": Accepted creation for resource type remoteCSE without containing attribute " & p_optionalAttribute.name);
f_setResource(v_request.primitiveContent,int16); f_setResource(v_response.primitive.responsePrimitive.primitiveContent,int16);
} }
[] mccPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop; tc_ac.stop;
...@@ -1410,8 +1410,8 @@ module OneM2M_PermutationFunctions { ...@@ -1410,8 +1410,8 @@ module OneM2M_PermutationFunctions {
var ResponsePrimitive v_responsePrimitive; var ResponsePrimitive v_responsePrimitive;
//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;
} }
......
...@@ -20,43 +20,15 @@ module OneM2M_TestControl_ASN_profile { ...@@ -20,43 +20,15 @@ module OneM2M_TestControl_ASN_profile {
control { control {
//CE_GEN_00001 //CE_GEN_00001
if(PICS_PRIMITIVE_SCOPE_CSE_RELATIVE and PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_CRE_001_CSR());}
if(PICS_PRIMITIVE_SCOPE_SP_RELATIVE and PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_CRE_001_SPR());}
if(PICS_PRIMITIVE_SCOPE_ABSOLUTE and PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_CRE_001_ABS());}
if(PICS_PRIMITIVE_SCOPE_CSE_RELATIVE and PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_RET_001_CSR());}
if(PICS_PRIMITIVE_SCOPE_SP_RELATIVE and PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_RET_001_SPR());}
if(PICS_PRIMITIVE_SCOPE_ABSOLUTE and PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_RET_001_ABS());}
if(PICS_PRIMITIVE_SCOPE_CSE_RELATIVE and PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_UPD_001_CSR());}
if(PICS_PRIMITIVE_SCOPE_SP_RELATIVE and PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_UPD_001_SPR());}
if(PICS_PRIMITIVE_SCOPE_ABSOLUTE and PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_UPD_001_ABS());}
if(PICS_PRIMITIVE_SCOPE_CSE_RELATIVE and PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_DEL_001_CSR());}
if(PICS_PRIMITIVE_SCOPE_SP_RELATIVE and PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_DEL_001_SPR());}
if(PICS_PRIMITIVE_SCOPE_ABSOLUTE and PICS_UNSTRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_DEL_001_ABS());}
if(PICS_PRIMITIVE_SCOPE_CSE_RELATIVE and PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_CRE_002_CSR());}
if(PICS_PRIMITIVE_SCOPE_SP_RELATIVE and PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_CRE_002_SPR());}
if(PICS_PRIMITIVE_SCOPE_ABSOLUTE and PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_CRE_002_ABS());}
if(PICS_PRIMITIVE_SCOPE_CSE_RELATIVE and PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_RET_002_CSR());}
if(PICS_PRIMITIVE_SCOPE_SP_RELATIVE and PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_RET_002_SPR());}
if(PICS_PRIMITIVE_SCOPE_ABSOLUTE and PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_RET_002_ABS());}
if(PICS_PRIMITIVE_SCOPE_CSE_RELATIVE and PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_UPD_002_CSR());}
if(PICS_PRIMITIVE_SCOPE_SP_RELATIVE and PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_UPD_002_SPR());}
if(PICS_PRIMITIVE_SCOPE_ABSOLUTE and PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_UPD_002_ABS());}
if(PICS_PRIMITIVE_SCOPE_CSE_RELATIVE and PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_DEL_002_CSR());}
if(PICS_PRIMITIVE_SCOPE_SP_RELATIVE and PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_DEL_002_SPR());}
if(PICS_PRIMITIVE_SCOPE_ABSOLUTE and PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT) {execute (TC_CSE_GEN_DEL_002_ABS());}
//CE_GEN_00002 //CE_GEN_00002
//CE_REG_00005 //CE_REG_00005
if(true) {execute (TC_CSE_REG_CRE_024());} if(PICS_ASN_CSE) {execute (TC_CSE_REG_CRE_024());}
if(true) {execute (TC_CSE_DMR_RET_013_CSR());} if(PICS_CSR_POA) {execute (TC_CSE_REG_CRE_026_POA());}
if(true) {execute (TC_CSE_REG_CRE_026_POA());}
//CE_DMR_00002 //CE_DMR_00002
if(true) {execute (TC_CSE_DMR_CRE_001_CIN_CNT());}
if(true) {execute (TC_CSE_DMR_RET_001_CIN());}
if(true) {execute (TC_CSE_DMR_UPD_011());}
if(true) {execute (TC_CSE_DMR_DEL_001_CIN());}
} }
......
...@@ -377,7 +377,7 @@ module OneM2M_Testcases_CSE_Release_1 { ...@@ -377,7 +377,7 @@ module OneM2M_Testcases_CSE_Release_1 {
group Create{ group Create{
/** /**
* @desc Check that the IUT accepts an AE registration (allowed App-ID, C-AE-ID-STEM not provided by AE) * @desc Check that the IUT accepts a create request of <AE> resource with attributes multiplicity equals to 1 and provided preprovisioned SP_relative_ AE_ID.
* *
*/ */
testcase TC_CSE_REG_CRE_001() runs on AeSimu system CseSystem { testcase TC_CSE_REG_CRE_001() runs on AeSimu system CseSystem {
...@@ -386,7 +386,8 @@ module OneM2M_Testcases_CSE_Release_1 { ...@@ -386,7 +386,8 @@ module OneM2M_Testcases_CSE_Release_1 {
var RequestPrimitive v_request; var RequestPrimitive v_request;
var integer v_cseBaseIndex := -1; var integer v_cseBaseIndex := -1;
var ResourceType v_resourceType := int2; var ResourceType v_resourceType := int2;
var charstring v_action := __SCOPE__ & ": Please, make sure that the following AE-ID is allowed to register: " & PX_ALLOWED_C_AE_IDS[0];
//Test control //Test control
if(not(PICS_IN_CSE)) { if(not(PICS_IN_CSE)) {
setverdict(inconc, __SCOPE__ & ": IUT shall be IN-CSE to run this test case"); setverdict(inconc, __SCOPE__ & ": IUT shall be IN-CSE to run this test case");
...@@ -397,9 +398,11 @@ module OneM2M_Testcases_CSE_Release_1 { ...@@ -397,9 +398,11 @@ module OneM2M_Testcases_CSE_Release_1 {
f_cf01Up(); f_cf01Up();
//Preamble //Preamble
action(v_action);
f_sleepIgnoreDef(30.0);
//Test Body //Test Body
v_request := valueof(m_createAe(PX_APP_ID, omit, "S-AE-ID-STEM")); v_request := valueof(m_createAe(PX_APP_ID, omit, f_getResourceAddress(-1, -, e_spRelative) & "/" & PX_ALLOWED_C_AE_IDS[0]));
v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, -1); v_request := f_getCreateRequestPrimitive(v_resourceType, v_request, -1);
...@@ -510,6 +513,7 @@ module OneM2M_Testcases_CSE_Release_1 { ...@@ -510,6 +513,7 @@ module OneM2M_Testcases_CSE_Release_1 {
var RequestPrimitive v_request; var RequestPrimitive v_request;
var integer v_cseBaseIndex := -1; var integer v_cseBaseIndex := -1;
var ResourceType v_resourceType := int2; var ResourceType v_resourceType := int2;
var charstring v_action := __SCOPE__ & ": Please, make sure that the following AE-ID is not allowed to register: " & PX_NOT_ALLOWED_C_AE_IDS[0];
//Test control //Test control
...@@ -520,6 +524,8 @@ module OneM2M_Testcases_CSE_Release_1 { ...@@ -520,6 +524,8 @@ module OneM2M_Testcases_CSE_Release_1 {
//vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSE); //vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSE);
//TODO: create serviceSubscribedProfile, Node, and serviceSubscribedAppRule //TODO: create serviceSubscribedProfile, Node, and serviceSubscribedAppRule
//v_cseBaseIndex := f_cse_preamble_createServiceSubscribedProfile({"C*"}); //c_CRUDNDi); //v_cseBaseIndex := f_cse_preamble_createServiceSubscribedProfile({"C*"}); //c_CRUDNDi);
action(v_action);
f_sleepIgnoreDef(30.0);
//Test Body //Test Body
//v_request := valueof(m_createAe(PX_APP_ID, omit, "C-AE-ID-STEM")); //v_request := valueof(m_createAe(PX_APP_ID, omit, "C-AE-ID-STEM"));
...@@ -573,11 +579,11 @@ module OneM2M_Testcases_CSE_Release_1 { ...@@ -573,11 +579,11 @@ module OneM2M_Testcases_CSE_Release_1 {
tc_ac.start; tc_ac.start;
alt{ alt{
[]mccPortIn.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.");
} }
[]mccPortIn.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.");
} }
...@@ -796,15 +802,20 @@ module OneM2M_Testcases_CSE_Release_1 { ...@@ -796,15 +802,20 @@ module OneM2M_Testcases_CSE_Release_1 {
//Preambule //Preambule
vc_remoteCseIndex := f_cse_registerRemoteCse(m_createRemoteCSEBase); vc_remoteCseIndex := f_cse_registerRemoteCse(m_createRemoteCSEBase);
v_aeAnncIndex := f_cse_announceResource(int2, m_createAEAnnc(-, "/" & "SAE1", PX_APP_ID, PX_CSE1_ID & "/" & "SAE1")); //Create AEAnnc
v_aeAnncIndex := f_cse_announceResource(int2, m_createAEAnnc(-, PX_CSE1_ID & "/" & "S", PX_APP_ID, PX_CSE1_ID & "/" & "S"));
//Update AEAnnc to simulate deregistration of AE
v_request := f_getUpdateRequestPrimitive(f_getAnnouncedResourceType(int2),v_aeAnncIndex, valueof(m_updateAEAnncBase));//TODO
//v_request.primitiveContent.aEAnnc.link := "";//TODO To fix when base specs are fixed
f_cse_updateAnnouncedResource(v_request);
//Test Body //Test Body
v_request := valueof(m_updateAEAnnc(-, -, -, PX_APP_ID, -)); //TODO to double check all parameters v_request := valueof(m_updateAEAnncBase);
v_request := f_getUpdateRequestPrimitive(f_getAnnouncedResourceType(int2),v_aeAnncIndex, v_request);//TODO v_request := f_getUpdateRequestPrimitive(f_getAnnouncedResourceType(int2),v_aeAnncIndex, v_request);//TODO
v_request.from_ := f_getResourceAddress(-1,e_hierarchical, e_absolute) & "/S";
v_request.primitiveContent.aEAnnc.app_ID := PX_APP_ID;
v_request.primitiveContent.aEAnnc.labels := {"Credential-ID:None"}; v_request.primitiveContent.aEAnnc.labels := {"Credential-ID:None"};
mccPort.send(m_request(v_request)); mccPort.send(m_request(v_request));
...@@ -948,11 +959,6 @@ module OneM2M_Testcases_CSE_Release_1 { ...@@ -948,11 +959,6 @@ module OneM2M_Testcases_CSE_Release_1 {
setverdict(fail, __SCOPE__ & "Resource ID not set correctly."); setverdict(fail, __SCOPE__ & "Resource ID not set correctly.");
} }
if(f_isScopeSpRelative(v_response.primitive.responsePrimitive.primitiveContent.aE.aE_ID)){
setverdict(pass, __SCOPE__ & "AE ID set correctly.");
} else {
setverdict(fail, __SCOPE__ & "AE ID not set correctly.");
}
} }
[] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int2001))) -> value v_response{ [] mcaPort.receive(mw_response(mw_responsePrimitiveInverse(int2001))) -> value v_response{
tc_ac.stop; tc_ac.stop;
...@@ -1075,15 +1081,17 @@ module OneM2M_Testcases_CSE_Release_1 { ...@@ -1075,15 +1081,17 @@ module OneM2M_Testcases_CSE_Release_1 {
var RequestPrimitive v_request; var RequestPrimitive v_request;
var integer v_cseBaseIndex := -1; var integer v_cseBaseIndex := -1;
var ResourceType v_resourceType := int2; var ResourceType v_resourceType := int2;
var charstring v_action := __SCOPE__ & ": Please, make sure that the following AppId is not allowed to register: " & PX_APP_ID;
//Test control //Test control