Skip to content
Snippets Groups Projects
Commit 674b1b76 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Correction of:

- g_CSE_DMR_CRE_BV_015 - no need for response to be returned
- f_CSE_DMR_CRE_BV_015 - handling of creator attribute -> assigning a right value (AE-ID or CSE-ID)

Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parent 36aa60a9
No related branches found
No related tags found
1 merge request!25Ae fixes
......@@ -7,7 +7,7 @@
*
* @author oneM2M
* @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Functions.ttcn $
* $Id: OneM2M_Functions.ttcn 263 2017-05-16 10:09:27Z reinaortega $
* $Id: OneM2M_Functions.ttcn 277 2017-05-18 04:51:46Z reinaortega $
* @desc Module containing functions for oneM2M
*
*/
......@@ -1100,18 +1100,20 @@ module OneM2M_Functions {
}
if (p_resourceType == int23) {//subscription
//notificationURI
if(match(valueof(p_request.primitiveContent.any_1[0].Subscription_optional.notificationURI), v_defaultListOfURIs )){
p_request.primitiveContent.any_1[0].Subscription_optional.notificationURI := {f_getResourceAddress(p_parentIndex)};
}
/*if(PX_FROM_IS_AE_ID) {
if(PX_UNSTRUCTURED){
p_request.primitiveContent.any_1[0].Subscription_optional.notificationURI := {vc_aeAux.aE_ID};
} else {
p_request.primitiveContent.any_1[0].Subscription_optional.notificationURI := {PX_CSE_ID & "/" & vc_aeAux.aE_ID};
}
} else {
p_request.primitiveContent.any_1[0].Subscription_optional.notificationURI := {"/" & PX_CSE_NAME & "/" & PX_AEAUX_NAME};//c_aeAuxName
}*/
//creator attribute
if(ispresent(p_request.primitiveContent.any_1[0].Subscription_optional.creator)) {
p_request.primitiveContent.any_1[0].Subscription_optional.creator := f_getCreator(p_parentIndex);
}
}
if (p_resourceType == int4) {//contentInstance
//creator attribute
if(ispresent(p_request.primitiveContent.any_1[0].ContentInstance_optional.creator)) {
p_request.primitiveContent.any_1[0].ContentInstance_optional.creator := f_getCreator(p_parentIndex);
}
}
return valueof(p_request);
......@@ -1304,6 +1306,26 @@ module OneM2M_Functions {
return PX_SUPER_USER;
}
}
/**
* @desc Resolution of the creator attribute for a given resource
* @param p_targetResourceIndex Internal resource index of the given resource
* @return AE-ID or CSE-ID of the entity creating the given resource
* @verdict
*/
function f_getCreator(integer p_targetResourceIndex := -1) runs on CseTester return XSD.ID {
if(p_targetResourceIndex == -1) {
return PX_CSE_ID;
}
if(ischosen(vc_resourcesList[p_targetResourceIndex].resource.any_1[0].AE_optional)) {
return vc_resourcesList[p_targetResourceIndex].resource.any_1[0].AE_optional.aE_ID;
} else {
return f_getCreator(vc_resourcesList[p_targetResourceIndex].parentIndex);
}
}
/**
* @desc Return of a index of a specific attribute from an attributeList by attributeName
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment