Commit 1633ac83 authored by Pramod Kulkarni's avatar Pramod Kulkarni Committed by Miguel Angel Reina Ortega
Browse files

Improvements for the CSE registration procedure:


- New function f_getResourceIndex, used in default a_cse_cf02_cse1
- Update of default to receive some optional messages (retrieve CSEBase, etc..) from MN

Improvements for handling Announcement procedure
- announcement handler updated
- values in template AEAnnc corrected
- new templates for announced resources
Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parent 1c9895c1
......@@ -86,6 +86,9 @@ module OneM2M_Functions {
// Map
map(self:mcaPort, system:mcaPort);
map(self:acPort, system:acPort);
if(PX_UT_IMPLEMENTED) {
map(self:utPort, system:utPort);
}
activate(a_default());
activate(a_cse_cf02_ae1());
vc_cse1.start(f_cf02UpCse1());
......@@ -261,6 +264,9 @@ module OneM2M_Functions {
unmap(self:mcaPort, system:mcaPort);
unmap(self:acPort, system:acPort);
if(PX_UT_IMPLEMENTED){
unmap(self:utPort, system:utPort);
}
unmap(vc_cse1:mccPort, system:mccPort);
unmap(vc_cse1:mccPortIn, system:mccPortIn);
unmap(vc_cse1:acPort, system:acPort);
......@@ -1117,25 +1123,28 @@ module OneM2M_Functions {
* @verdict
*/
//TODO To finalize this function
function f_cse_resourceAnnouncementHandler(template XSD.ID p_from := *, template XSD.ID p_to := ?) runs on CseSimu {
function f_cse_resourceAnnouncementHandler(template RequestPrimitive p_requestprimitive := ?) runs on CseSimu {
// Local variables
var MsgIn v_request;
var integer v_parentIndex := vc_localRemoteCseIndex;
var integer v_announcedResourceIndex;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_announcedResource;
tc_ac.start;
alt {
[] mccPortIn.receive(mw_request(mw_create(p_from, p_to))) -> value v_request {
[] mccPortIn.receive(mw_request(p_requestprimitive)) -> value v_request {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ":INFO: Announcement received");
//TODO Save resource and generate required attributes
v_responsePrimitive := f_getCreateResponsePrimitive(v_request.primitive.requestPrimitive.resourceType, v_request.primitive.requestPrimitive);
mccPortIn.send(m_response(v_responsePrimitive));
f_checkAttributesToBeSaved(v_request.primitive.requestPrimitive.resourceType, v_request.primitive.requestPrimitive, vc_response.primitive.responsePrimitive);
f_setResource(vc_response.primitive.responsePrimitive.primitiveContent, v_request.primitive.requestPrimitive.resourceType, vc_remoteCseIndex);
}
[] mccPortIn.receive{
tc_ac.stop;
setverdict(fail, __SCOPE__ & ":ERROR: Unexpected message received");
v_announcedResource:= f_cse_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, v_parentIndex,v_request.primitive.requestPrimitive.resourceType);
v_announcedResourceIndex := f_setLocalResource(v_announcedResource, v_request.primitive.requestPrimitive.resourceType, v_parentIndex);
v_responsePrimitive := valueof(m_responsePrimitive(int2001,v_request.primitive.requestPrimitive.requestIdentifier));
v_responsePrimitive.from_ := PX_CSE1_ID;
v_responsePrimitive.to_ := v_request.primitive.requestPrimitive.from_;
v_responsePrimitive.primitiveContent := vc_localResourcesList[vc_localRemoteCseIndex].resource;
mccPortIn.send(m_response(v_responsePrimitive));
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ":ERROR: No announcement received");
......@@ -1695,6 +1704,13 @@ module OneM2M_Functions {
var integer v_resourceIndex := -1;
var template UtTriggerPrimitive v_utRequest := m_utCreateRemoteCSE;
var charstring v_action := "Please, send a CSE registration request";
var integer v_parentIndex := vc_localRemoteCseIndex;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_announcedResource;
var boolean v_remoteCSERegistered:=false;
var integer v_ResourceIndex := -1;
//send triggering primitive to SUT
f_sendUtPrimitive(v_utRequest,v_action);
......@@ -1714,15 +1730,16 @@ module OneM2M_Functions {
mccPortIn.send(m_response(v_response));
v_resourceIndex := f_setResource(v_request.primitive.requestPrimitive.primitiveContent, int16, -1);
}
[] mccPortIn.receive {
tc_ac.stop;
setverdict(inconc, __SCOPE__&":INFO: Unexpected message received");
v_remoteCSERegistered:=true;
tc_ac.start;
repeat;
}
[] tc_ac.timeout {
setverdict(inconc, __SCOPE__&":INFO: No request received for creating resource type remoteCSE");
if(not (v_remoteCSERegistered)){
setverdict(inconc, __SCOPE__&":INFO: No request received for creating resource type remoteCSE");
}
}
}
}
f_checkCseSimuStatus();
......@@ -1801,7 +1818,7 @@ module OneM2M_Functions {
v_myResource.remoteCSE.resourceName := "remoteCSE" & int2str(v_resourceIndex);
}
v_myResource.remoteCSE.resourceType := p_resourceType;
v_myResource.remoteCSE.resourceID := "remoteCSE" & int2str(v_resourceIndex);
v_myResource.remoteCSE.resourceID := f_resourceIdCleaner(v_myResource.remoteCSE.cSE_ID);
v_myResource.remoteCSE.parentID := f_getResourceId(vc_localResourcesList[p_parentIndex].resource);
v_myResource.remoteCSE.creationTime := fx_generateTimestamp();
v_myResource.remoteCSE.creationTime := "20171231T012345";
......@@ -1823,11 +1840,81 @@ module OneM2M_Functions {
v_myResource.remoteCSE.nodeLink := omit;
}
} else if (p_resourceType == int10002 and ispresent (p_resource)) { //AE Annc
if(ischosen(p_resource.aEAnnc)) {
v_myResource.aEAnnc.expirationTime := p_resource.aEAnnc.expirationTime;
v_myResource.aEAnnc.accessControlPolicyIDs := p_resource.aEAnnc.accessControlPolicyIDs;
v_myResource.aEAnnc.labels := p_resource.aEAnnc.labels;
}
} else if (p_resourceType == int10001 and ispresent (p_resource)) { //Acp Annc
if(ischosen(p_resource.accessControlPolicyAnnc)) {
v_myResource.accessControlPolicyAnnc.expirationTime := p_resource.accessControlPolicyAnnc.expirationTime;
v_myResource.accessControlPolicyAnnc.labels := p_resource.accessControlPolicyAnnc.labels;
v_myResource.accessControlPolicyAnnc.privileges := p_resource.accessControlPolicyAnnc.privileges;
v_myResource.accessControlPolicyAnnc.selfPrivileges := p_resource.accessControlPolicyAnnc.selfPrivileges;
}
} else if (p_resourceType == int10003 and ispresent (p_resource)) { //Container Annc
if(ischosen(p_resource.containerAnnc)) {
v_myResource.containerAnnc.expirationTime := p_resource.containerAnnc.expirationTime;
v_myResource.containerAnnc.accessControlPolicyIDs := p_resource.containerAnnc.accessControlPolicyIDs;
v_myResource.containerAnnc.labels := p_resource.containerAnnc.labels;
}
} else if (p_resourceType == int10009 and ispresent (p_resource)) { //Group Annc
if(ischosen(p_resource.groupAnnc)) {
v_myResource.groupAnnc.expirationTime := p_resource.groupAnnc.expirationTime;
v_myResource.groupAnnc.accessControlPolicyIDs := p_resource.groupAnnc.accessControlPolicyIDs;
v_myResource.groupAnnc.labels := p_resource.groupAnnc.labels;
}
} else if (p_resourceType == int10014 and ispresent (p_resource)) { //ContentInstance Annc
if(ischosen(p_resource.contentInstanceAnnc)) {
v_myResource.contentInstanceAnnc.expirationTime := p_resource.contentInstanceAnnc.expirationTime;
v_myResource.contentInstanceAnnc.labels := p_resource.contentInstanceAnnc.labels;
}
} else if (p_resourceType == int1 and ispresent (p_resource)) { //Acp Resource
if(ischosen (p_resource.accessControlPolicy)){
v_myResource.accessControlPolicy := valueof(p_resource.accessControlPolicy);
if(not(ispresent(p_resource.accessControlPolicy.resourceName))) {
v_myResource.accessControlPolicy.resourceName := "accessControlPolicy" & int2str(v_resourceIndex);
}
v_myResource.accessControlPolicy.resourceType := p_resourceType;
v_myResource.accessControlPolicy.resourceID := "accessControlPolicy" & int2str(v_resourceIndex);
v_myResource.accessControlPolicy.parentID := f_getResourceId(vc_localResourcesList[p_parentIndex].resource);
v_myResource.accessControlPolicy.labels := p_resource.accessControlPolicy.labels;
v_myResource.accessControlPolicy.creationTime := fx_generateTimestamp();
if(not(ispresent(p_resource.accessControlPolicy.expirationTime))) {
v_myResource.accessControlPolicy.expirationTime := "20301231T012345";
}
v_myResource.accessControlPolicy.lastModifiedTime := v_myResource.accessControlPolicy.creationTime;
v_myResource.accessControlPolicy.announceTo := omit;
v_myResource.accessControlPolicy.announcedAttribute := omit;
}
}
return v_myResource;
}//End of function
/**
* @desc Sending of a request primitive over mca port
* @param p_resourceType Resource type of the resource to be created
* @param p_requestPrimitive CREATE request primitive for the resource to be created
* @param p_parentIndex Internal resource index which indicates the parent of the resource to be created
* @return Internal resource index of the created resource
* @verdict
*/
function f_cse_sendCreateRequestPrimitive(in ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive := m_create, integer p_parentIndex := -1) runs on AeSimu {
var RequestPrimitive v_request;
var integer v_resourceIndex := -1;
v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, p_parentIndex);
mcaPort.send(m_request(v_request));
}
}//end group CseSimuFunctions
......@@ -1867,7 +1954,71 @@ module OneM2M_Functions {
*/
altstep a_cse_cf02_cse1() runs on CseSimu {
[] mccPortIn.receive {
var PrimitiveContent v_localResource;
var integer vc_localResourceIndex := -1;
var MsgIn v_request;
var ResponsePrimitive v_response;
var integer v_localResourceIndex := -1;
[] mccPortIn.receive(mw_request(mw_create())) -> value v_request {
log(__SCOPE__&": WARNING: Unexpected CREATE message received");
tc_ac.stop;
v_localResource := f_cse_generateLocalResource(v_request.primitive.requestPrimitive.primitiveContent, vc_cSEBaseIndex, v_request.primitive.requestPrimitive.resourceType);//TODO Get index from v_request.primitive.requestPrimitive.to_
vc_localResourceIndex := f_setLocalResource(v_localResource, v_request.primitive.requestPrimitive.resourceType, vc_cSEBaseIndex);
v_response := valueof(m_responsePrimitive(int2001,v_request.primitive.requestPrimitive.requestIdentifier));
v_response.from_ := PX_CSE1_ID;
v_response.to_ := v_request.primitive.requestPrimitive.from_;
v_response.primitiveContent := vc_localResourcesList[vc_localResourceIndex].resource;
mccPortIn.send(m_response(v_response));
tc_ac.start;
repeat;
}
[] mccPortIn.receive(mw_request(mw_retrieve(f_getLocalResourceAddress(-, e_hierarchical, e_spRelative)))) -> value v_request {
tc_ac.stop;
log(__SCOPE__&": WARNING: Unexpected RETRIEVE message received");
v_localResourceIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
if(v_localResourceIndex == -1)
{
log(__SCOPE__&": ERROR: Resource Index not valid");
v_response := valueof(m_responsePrimitive(int4004,v_request.primitive.requestPrimitive.requestIdentifier));
v_response.from_ := PX_CSE1_ID;
v_response.to_ := v_request.primitive.requestPrimitive.from_;
mccPortIn.send(m_response(v_response));
} else {
v_response := valueof(m_responsePrimitive(int2000,v_request.primitive.requestPrimitive.requestIdentifier));
v_response.from_ := PX_CSE1_ID;
v_response.to_ := v_request.primitive.requestPrimitive.from_;
v_response.primitiveContent := vc_localResourcesList[vc_cSEBaseIndex].resource;
mccPortIn.send(m_response(v_response));
}
tc_ac.start;
repeat;
}
[] mccPortIn.receive(mw_request(mw_update())) -> value v_request {
tc_ac.stop;
log(__SCOPE__&": WARNING: Unexpected UPDATE message received");
v_localResourceIndex := f_getResourceIndex(v_request.primitive.requestPrimitive.to_);
if(v_localResourceIndex == -1)
{
log(__SCOPE__&": ERROR: Resource Index not valid");
v_response := valueof(m_responsePrimitive(int4004,v_request.primitive.requestPrimitive.requestIdentifier));
v_response.from_ := PX_CSE1_ID;
v_response.to_ := v_request.primitive.requestPrimitive.from_;
mccPortIn.send(m_response(v_response));
} else {
v_response := valueof(m_responsePrimitive(int2004,v_request.primitive.requestPrimitive.requestIdentifier));
v_response.from_ := PX_CSE1_ID;
v_response.to_ := v_request.primitive.requestPrimitive.from_;
v_response.primitiveContent := vc_localResourcesList[vc_localRemoteCseIndex].resource;
mccPortIn.send(m_response(v_response));
}
tc_ac.start;
repeat;
}
[] mccPortIn.receive (mw_request(?)){
log(__SCOPE__&": WARNING: Unexpected message received");
repeat;
}
......@@ -2525,8 +2676,34 @@ module OneM2M_Functions {
* @param p_address Resource URI (can be structured/unstructured cseRelative/spRelative/absolute)
* @return Internal resource index of the given resource or -1 in case of error
*/
function f_getResourceIndex(in XSD.AnyURI p_address) runs on CseSimu return integer {
return vc_cSEBaseIndex; //TODO
function f_getResourceIndex(in XSD.ID p_receivedURI) runs on CseSimu return integer {
var integer v_resourceIndex := -1;
var integer i;
var XSD.ID v_resourceName;
var XSD.ID v_resourceID;
if (f_isHierarchical(p_receivedURI)) {
v_resourceName := f_resourceIdCleaner(p_receivedURI);
for(i:=0; i < lengthof(vc_resourcesList); i := i+1){
if(match(f_getResourceName(vc_localResourcesList[i].resource), v_resourceName)){
v_resourceIndex := i;
break;
}
}
} else {
v_resourceID := f_resourceIdCleaner(p_receivedURI);
for(i:=0; i < lengthof(vc_resourcesList); i := i+1){
if(match(f_getResourceId(vc_localResourcesList[i].resource), v_resourceID)){
v_resourceIndex := i;
break;
}
}
}
return v_resourceIndex;
}
/**
......@@ -2624,7 +2801,7 @@ module OneM2M_Functions {
if(p_targetResourceIndex == -1) {
return PX_CSE1_ID & "/" & PX_CSE1_RESOURCE_ID;
} else {
v_resourceAddress := PX_CSE_ID & "/" & f_getResourceId(vc_localResourcesList[p_targetResourceIndex].resource);
v_resourceAddress := PX_CSE1_ID & "/" & f_getResourceId(vc_localResourcesList[p_targetResourceIndex].resource);
return v_resourceAddress;
}
} else {
......@@ -2657,6 +2834,7 @@ module OneM2M_Functions {
}
/**
* @desc Saving of a resource and its parent index in the internal resource list
* @param p_resource Resource to be saved
......
......@@ -391,7 +391,7 @@ module OneM2M_Templates {
to_ := p_to,
from_ := p_from,
requestIdentifier := ?,
resourceType := ?,
resourceType := omit,
primitiveContent:= ?,
roleIDs := *,
originatingTimestamp := *,
......@@ -592,6 +592,35 @@ module OneM2M_Templates {
tokenRequestIndicator := *
}
/**
* @desc Base Reception template for create operation for announced resources
*/
template RequestPrimitive mw_createAnnc(template XSD.ID p_from := ?, template XSD.ID p_to := ?) := {
operation := int1,
to_ := p_to,
from_ := p_from,
requestIdentifier := ?,
resourceType := ?,
primitiveContent := ?,
roleIDs := *,
originatingTimestamp := *,
requestExpirationTimestamp := *,
resultExpirationTimestamp := *,
operationExecutionTime := *,
responseType := *,
resultPersistence := *,
resultContent := *,
eventCategory := *,
deliveryAggregation := *,
groupRequestIdentifier := *,
filterCriteria := *,
discoveryResultType := *,
tokens := *,
tokenIDs := *,
localTokenIDs := *,
tokenRequestIndicator := *
}
/**
* @desc Base CREATE request primitive for AEAnnc resource
......@@ -612,7 +641,7 @@ module OneM2M_Templates {
/**
* @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 XSD.ID p_from := ?, template XSD.ID p_to := ?, template AcpType p_accessControlPolicyIds := ?) modifies mw_createAnnc := {
resourceType := int10002,
primitiveContent := {aEAnnc := mw_contentCreateAEAnnc({"Credential-ID:None"}, p_accessControlPolicyIds)}
};
......@@ -661,7 +690,7 @@ module OneM2M_Templates {
template RequestPrimitive mw_createAccessControlPolicyAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
to_ := p_to,
from_ := p_from,
resourceType := int10002,
resourceType := int10001,
primitiveContent := {accessControlPolicyAnnc := mw_contentCreateAcpAnnc(-)}
};
......@@ -1354,14 +1383,14 @@ module OneM2M_Templates {
expirationTime := ?,//MA M
link := ?,//M
dynamicAuthorizationConsultationIDs := omit, //OA
appName := omit,//OA
app_ID := omit,//OA
aE_ID := omit,//OA
pointOfAccess := omit, //OA {"http://127.0.0.1:1400/monitor"},//O //{"http://192.168.1.92:18080/notifications/AE"}, // TODO: Check this => AE PoA
ontologyRef := omit,//OA
nodeLink := omit,//OA
requestReachability := omit,//OA
contentSerialization := omit,//OA
appName := *,//OA
app_ID := *,//OA
aE_ID := *,//OA
pointOfAccess := *, //OA {"http://127.0.0.1:1400/monitor"},//O //{"http://192.168.1.92:18080/notifications/AE"}, // TODO: Check this => AE PoA
ontologyRef := *,//OA
nodeLink := *,//OA
requestReachability := *,//OA
contentSerialization := *,//OA
e2eSecInfo := ?, //MA
choice := omit//NA
};
......@@ -1427,7 +1456,7 @@ module OneM2M_Templates {
* @desc Base reception template of primitiveContent for CREATE operation for AccessControlPolicyAnnc resource
* @param p_labels Labels
*/
template AccessControlPolicyAnnc_optional mw_contentCreateAcpAnnc (in template (omit) Labels p_labels := omit) := {
template AccessControlPolicyAnnc_optional mw_contentCreateAcpAnnc (in template Labels p_labels := ?) := {
resourceName := omit,//NA M
resourceType := omit,//NA M
resourceID := omit,//NA M
......@@ -1437,8 +1466,8 @@ module OneM2M_Templates {
labels := p_labels,//MA
expirationTime := ?,//MA M
link := ?,//M
privileges := *,//MA
selfPrivileges := *,//MA
privileges := ?,//MA
selfPrivileges := ?,//MA
choice := omit//NA
};
......
......@@ -62,9 +62,9 @@ module OneM2M_TestSystem {
//global variables
var MyResourcesList vc_localResourcesList := {};
var AeSimu vc_ae1;//For CF02 when CseSimu is master
var integer vc_remoteCseIndex;
var integer vc_localRemoteCseIndex;
var integer vc_cSEBaseIndex; //Index of the CSEBase resource of the Tester inside vc_localResourcesList
var integer vc_remoteCseIndex := -1;
var integer vc_localRemoteCseIndex := -1;
var integer vc_cSEBaseIndex := -1; //Index of the CSEBase resource of the Tester inside vc_localResourcesList
};
type component InCseSimu extends CseSimu {}
......@@ -77,6 +77,7 @@ module OneM2M_TestSystem {
port OneM2MPort mccPort;
port OneM2MPort mccPortIn;
port AdapterControlPort acPort;
port UpperTesterPort utPort;
}
type component AeSystem {
......
......@@ -6181,14 +6181,17 @@ module OneM2M_PermutationFunctions {
group Basic {
function f_CSE_ANNC_001(ResourceType p_resourceType, template RequestPrimitive p_requestCreatePrimitive, template (present) RequestPrimitive p_requestAnnc, template(omit) RequestPrimitive p_requestUpdatePrimitive := omit) runs on AeSimu {
function f_CSE_ANNC_001(ResourceType p_resourceType, template RequestPrimitive p_createRequestAnnc, in template RequestPrimitive p_requestCreatePrimitive := omit, in template RequestPrimitive p_requestUpdatePrimitive := omit) runs on AeSimu {
// Local variables
var MsgIn vc_response;
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_parentIndex := -1;
var integer v_containerIndex := -1;
var integer v_aeIndex := -1;
var integer v_resourceIndex;
var ResponsePrimitive v_responsePrimitive;
var template RequestPrimitive v_create := m_createAe(PX_APP_ID, omit, omit);
v_create.primitiveContent.aE.announceTo := {PX_CSE_ID};
// Test control
......@@ -6198,51 +6201,40 @@ module OneM2M_PermutationFunctions {
// Test adapter configuration
//Register the CSE
vc_cse1.start(f_cse_registerRemoteCse(m_createRemoteCSEBase));
vc_cse1.start(f_cse_registrationRemoteCse(mw_createRemoteCSE));
vc_cse1.done;
//Preamble
v_parentIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
vc_cse1.start(f_cse_resourceAnnouncementHandler());
v_resourceIndex := f_cse_createResource(p_resourceType, m_createAEAnnc(PX_APP_ID, omit, omit));
vc_cse1.start(f_cse_resourceAnnouncementHandler(mw_createAEAnnc(-, -, -)));
v_aeIndex := f_cse_createResource(int2,v_create);
vc_cse1.done;
// Test Body
if (ispresent (p_requestUpdatePrimitive)) {
v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_requestUpdatePrimitive);
v_responsePrimitive.responseStatusCode := int2004;
v_resourceIndex := f_cse_createResource(p_resourceType,p_requestCreatePrimitive);
v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_requestUpdatePrimitive);
v_responsePrimitive.responseStatusCode := int2004;
} else {
v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestCreatePrimitive, v_parentIndex);
v_responsePrimitive.responseStatusCode := int2001;
v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestCreatePrimitive, v_parentIndex);
v_responsePrimitive.responseStatusCode := int2001;
}
vc_cse1.start(f_cse_resourceAnnouncementHandler(p_createRequestAnnc));
mcaPort.send(m_request(v_request));
vc_cse1.start(f_cse_receiveCreateRequest(p_requestAnnc));
vc_cse1.done;
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(v_responsePrimitive.responseStatusCode))) -> value vc_response {
[] mcaPort.receive(mw_response(mw_responsePrimitive(v_responsePrimitive.responseStatusCode))) -> value v_response {
tc_ac.stop;
if (v_responsePrimitive.responseStatusCode == int2004){
setverdict(pass, __SCOPE__, ": Attribute of resource type " & int2str(enum2int(p_resourceType)) & " updated successfully");
} else if (v_responsePrimitive.responseStatusCode == int2001) {
setverdict(pass, __SCOPE__, ": Attribute of resource type " & int2str(enum2int(p_resourceType)) & " created successfully");
}
setverdict(pass, __SCOPE__, ": Operation for resource " & int2str(enum2int(p_resourceType)) & " performed successfully");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value vc_response {
tc_ac.stop;
setverdict(fail, __SCOPE__, ": Wrong response status code");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value vc_response {
tc_ac.stop;
setverdict(fail, __SCOPE__, ": Error while updating optional attribute");
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__, ": No answer while updating resource type " & int2str(enum2int(p_resourceType)));
}
}
}
// Postamble
f_cse_postamble_deleteResources();
......
......@@ -5485,7 +5485,7 @@ module OneM2M_Testcases_CSE_Release_2 {
var integer v_aeAuxIndex := -1;
var LocationSource v_locationSource := int1;//Network-based
var XSD.Duration locationUpdatePeriod := PX_LOCATION_UPDATE_PERIOD;
var XSD.Token locationTargetID := PX_LOCATION_TARGET_ID;
var LocationTargetID locationTargetID := PX_LOCATION_TARGET_ID;
var XSD.AnyURI locationServerAddress := PX_LOCATION_SERVER_ADDRESS;
var RequestPrimitive v_request;
var MsgIn v_response;
......@@ -5551,7 +5551,7 @@ module OneM2M_Testcases_CSE_Release_2 {
var integer v_acpAuxIndex := -1;
var LocationSource v_locationSource := int1;//Network-based
var XSD.Duration locationUpdatePeriod := PX_LOCATION_UPDATE_PERIOD;
var XSD.Token locationTargetID := PX_LOCATION_TARGET_ID;
var LocationTargetID locationTargetID := PX_LOCATION_TARGET_ID;
var XSD.AnyURI locationServerAddress := PX_LOCATION_SERVER_ADDRESS;
var RequestPrimitive v_request;
var MsgIn v_response;
......@@ -5620,7 +5620,7 @@ module OneM2M_Testcases_CSE_Release_2 {
var integer v_aeIndex := -1;
var LocationSource v_locationSource := int1;//Netwok-based
var XSD.Duration locationUpdatePeriod := PX_LOCATION_UPDATE_PERIOD;
var XSD.Token locationTargetID := PX_LOCATION_TARGET_ID;
var LocationTargetID locationTargetID := PX_LOCATION_TARGET_ID;
var XSD.AnyURI locationServerAddress := PX_LOCATION_SERVER_ADDRESS;
var RequestPrimitive v_request;
var MsgIn v_response;
......@@ -5683,7 +5683,7 @@ module OneM2M_Testcases_CSE_Release_2 {
var LocationSource v_locationSource := int1;//Netwok-based
var XSD.Duration locationUpdatePeriod := PX_LOCATION_UPDATE_PERIOD;
var XSD.Duration locationUpdatePeriod_invalid := c_invalid_location_update_period;
var XSD.Token locationTargetID := PX_LOCATION_TARGET_ID;
var LocationTargetID locationTargetID := PX_LOCATION_TARGET_ID;
var XSD.AnyURI locationServerAddress := PX_LOCATION_SERVER_ADDRESS;
var RequestPrimitive v_request;
var RequestPrimitive v_locpolicy_request_preamble;
......@@ -5745,7 +5745,7 @@ module OneM2M_Testcases_CSE_Release_2 {
var integer v_locPolicyResourceIndex := -1;
var integer v_locContainerResourceIndex := -1;
var XSD.Duration locationUpdatePeriod := PX_LOCATION_UPDATE_PERIOD;
var XSD.Token locationTargetID := PX_LOCATION_TARGET_ID;
var LocationTargetID locationTargetID := PX_LOCATION_TARGET_ID;
var XSD.AnyURI locationServerAddress := PX_LOCATION_SERVER_ADDRESS;
var RequestPrimitive v_loc_request_preamble;
var RequestPrimitive v_container_request_preamble;
......@@ -5943,7 +5943,7 @@ module OneM2M_Testcases_CSE_Release_2 {
var integer v_subscriptionResourceIndex := -1;
var LocationSource v_locationSource := int1;//Netwok-based
var XSD.Duration locationUpdatePeriod := PX_LOCATION_UPDATE_PERIOD;
var XSD.Token locationTargetID := PX_LOCATION_TARGET_ID;
var LocationTargetID locationTargetID := PX_LOCATION_TARGET_ID;
var XSD.AnyURI locationServerAddress := PX_LOCATION_SERVER_ADDRESS;
var RequestPrimitive v_locpolicy_request_preamble;
var RequestPrimitive v_container_request_preamble;
......@@ -6146,7 +6146,7 @@ module OneM2M_Testcases_CSE_Release_2 {
var integer v_locContainerResourceIndex := -1;
var LocationSource v_locationSource := int1;//Netwok-based
var XSD.Duration locationUpdatePeriod := PX_LOCATION_UPDATE_PERIOD;
var XSD.Token locationTargetID := PX_LOCATION_TARGET_ID;
var LocationTargetID locationTargetID := PX_LOCATION_TARGET_ID;
var XSD.AnyURI locationServerAddress := PX_LOCATION_SERVER_ADDRESS;
var RequestPrimitive v_locpolicy_request_preamble;
var RequestPrimitive v_container_request_preamble;
......@@ -6207,7 +6207,7 @@ module OneM2M_Testcases_CSE_Release_2 {
var MsgIn v_response;
var LocationSource v_locationSource := int1;//Netwok-based
var XSD.Duration locationUpdatePeriod := PX_LOCATION_UPDATE_PERIOD;
var XSD.Token locationTargetID := PX_LOCATION_TARGET_ID;
var LocationTargetID locationTargetID := PX_LOCATION_TARGET_ID;
var XSD.AnyURI locationServerAddress := PX_LOCATION_SERVER_ADDRESS;
......@@ -7252,19 +7252,91 @@ module OneM2M_Testcases_CSE_Release_2 {
testcase TC_CSE_ANNC_001_ACP_UPD() runs on Tester system CseSystem {
// Local variables