Merge changes from KETI_Test branch:

- Update f_getResourceAddress() function in terms of non-hierarchical SP-relative addressing format
- Update function f_getTemplateFromPrimitiveContent() to handle remoteCSE content
- Correct responsePrimitive resource content in testcase TC_CSE_DMR_CRE_001_CIN_CNT()
- Update f_getCreateRequestPrimitive() function in terms of group resource format
Signed-off-by: Miguel Angel Reina Ortega's avatarMiguel Angel Reina Ortega <miguelangel.reinaortega@etsi.org>
parent 0824db85
......@@ -2203,9 +2203,9 @@ module OneM2M_Functions {
} else if (p_primitiveScope == e_spRelative) {
if(p_addressingMethod == e_nonHierarchical) {
if(p_targetResourceIndex == -1) {
return PX_CSE_ID;
return PX_CSE_ID & "/" & PX_CSE_RESOURCE_ID;
} else {
v_resourceAddress := f_getResourceAddress(-, p_addressingMethod, p_primitiveScope) & "/" & f_getResourceId(vc_resourcesList[p_targetResourceIndex].resource);
v_resourceAddress := PX_CSE_ID & "/" & f_getResourceId(vc_resourcesList[p_targetResourceIndex].resource);
return v_resourceAddress;
}
} else {
......@@ -2758,7 +2758,7 @@ module OneM2M_Functions {
}
}
else if(ischosen(p_primitiveContent.subscription)){ // Schedule
else if(ischosen(p_primitiveContent.subscription)){ // Subscription
v_primitiveContent := {subscription := mw_contentSubscriptionBase};
if(ispresent(p_primitiveContent.subscription.labels)){
......@@ -2810,6 +2810,45 @@ module OneM2M_Functions {
v_primitiveContent.subscription.subscriberURI := ?;
}
}
else if(ischosen(p_primitiveContent.remoteCSE)){ //remoteCSE
v_primitiveContent := {remoteCSE := mw_contentRemoteCSEBase};
if(ispresent(p_primitiveContent.remoteCSE.labels)){
v_primitiveContent.remoteCSE.labels := ?;
}
if(ispresent(p_primitiveContent.remoteCSE.accessControlPolicyIDs)){
v_primitiveContent.remoteCSE.accessControlPolicyIDs := ?;
}
if(ispresent(p_primitiveContent.remoteCSE.announceTo)){
v_primitiveContent.remoteCSE.announceTo := ?;
}
if(ispresent(p_primitiveContent.remoteCSE.announcedAttribute)){
v_primitiveContent.remoteCSE.announcedAttribute := ?;
}
if(ispresent(p_primitiveContent.remoteCSE.cseType)){
v_primitiveContent.remoteCSE.cseType := ?;
}
if(ispresent(p_primitiveContent.remoteCSE.pointOfAccess)){
v_primitiveContent.remoteCSE.pointOfAccess := ?;
}
if(ispresent(p_primitiveContent.remoteCSE.m2M_Ext_ID)){
v_primitiveContent.remoteCSE.m2M_Ext_ID := ?;
}
if(ispresent(p_primitiveContent.remoteCSE.trigger_Recipient_ID)){
v_primitiveContent.remoteCSE.trigger_Recipient_ID := ?;
}
if(ispresent(p_primitiveContent.remoteCSE.nodeLink)){
v_primitiveContent.remoteCSE.nodeLink := ?;
}
}
return v_primitiveContent;
}
......
......@@ -2485,13 +2485,13 @@ module OneM2M_Testcases {
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
v_createRequest.primitiveContent.contentInstance.resourceName := omit;
v_ae1.start(f_CSE_DMR_CRE_001(int4, v_createRequest, m_createContainerBase));//Subscription
v_ae1.start(f_CSE_DMR_CRE_001(int4, v_createRequest, m_createContainerBase));//ContentInstance
v_ae1.done;
if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1);
if(not ispresent(v_responsePrimitive.primitiveContent.subscription.resourceName)){
if(not ispresent(v_responsePrimitive.primitiveContent.contentInstance.resourceName)){
setverdict(fail, __SCOPE__, ": Error, resourceName attribute not provided");
}
}
......
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