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

f_addPrefix removed. Prefix to be handled by TA


Signed-off-by: Miguel Angel Reina Ortega's avatarMiguel Angel Reina Ortega <miguelangel.reinaortega@etsi.org>
parent 4e7c3c00
......@@ -7,7 +7,7 @@
*
* @author ETSI
* @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Functions.ttcn $
* $Id: OneM2M_Functions.ttcn 149 2016-10-26 10:08:09Z reinaortega $
* $Id: OneM2M_Functions.ttcn 155 2016-10-28 12:08:48Z reinaortega $
* @desc Module containing functions for oneM2M
*
*/
......@@ -127,7 +127,7 @@ module OneM2M_Functions {
var integer v_aeAuxIndex := -1;
v_request := valueof(m_createAeAux(p_accessControlPolicyIDs, p_poaList));
v_request.to_ := f_addPrefix(f_getResourceAddress());
v_request.to_ := f_getResourceAddress();
mcaPort.send(m_request(v_request));
......@@ -299,7 +299,7 @@ module OneM2M_Functions {
v_request := valueof(m_createAcpAux(p_acpName := p_acpName, p_allowedOperations := p_allowedOperations));
v_request.to_ := f_addPrefix(f_getResourceAddress());
v_request.to_ := f_getResourceAddress();
mcaPort.send(m_request(v_request));
tc_ac.start;
......@@ -364,7 +364,7 @@ module OneM2M_Functions {
v_request := valueof(m_updateAcpBase);
v_request.to_ := f_addPrefix(f_getResourceAddress(vc_acpAuxIndex));
v_request.to_ := f_getResourceAddress(vc_acpAuxIndex);
v_request.primitiveContent.any_1[0].AccessControlPolicy_optional.privileges.accessControlRule_list := {
{
accessControlOriginators := PX_ACOR, //{"admin:admin"}
......@@ -459,7 +459,7 @@ module OneM2M_Functions {
var integer p_locresourceIndex := p_parentIndex;
p_request.from_ := f_getOriginator(p_parentIndex);
p_request.to_ := f_addPrefix(f_getResourceAddress(p_parentIndex));
p_request.to_ := f_getResourceAddress(p_parentIndex);
if (p_resourceType == int1) {//AccessControlPolicy
}
......@@ -511,7 +511,7 @@ module OneM2M_Functions {
p_request.from_ := f_getOriginator(p_resourceIndex);
p_request.to_ := f_addPrefix(f_getResourceAddress(p_resourceIndex));
p_request.to_ := f_getResourceAddress(p_resourceIndex);
if (p_resourceType == int3) {//Container
......
......@@ -7,7 +7,7 @@
*
* @author ETSI
* @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Pixits.ttcn $
* $Id: OneM2M_Pixits.ttcn 145 2016-10-24 14:37:40Z reinaortega $
* $Id: OneM2M_Pixits.ttcn 155 2016-10-28 12:08:48Z reinaortega $
* @desc Module containing Pixits for oneM2M
*
*/
......@@ -30,9 +30,9 @@ module OneM2M_Pixits {
modulepar charstring PX_XML_NAMESPACE := "om2m=""http://www.onem2m.org/xml/protocols""";
modulepar XSD.ID PX_CSE_NAME := "in-cse";
modulepar XSD.ID PX_CSE_NAME := "in-name";
modulepar XSD.AnyURI PX_URI_CSE := "/~/in-cse";
modulepar XSD.AnyURI PX_URI_CSE := "in-name";//TODO to be deleted
modulepar boolean PX_UNSTRUCTURED := false;
......
......@@ -7,7 +7,7 @@
*
* @author ETSI
* @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Templates.ttcn $
* $Id: OneM2M_Templates.ttcn 147 2016-10-25 07:52:22Z carres $
* $Id: OneM2M_Templates.ttcn 155 2016-10-28 12:08:48Z reinaortega $
* @desc Module containing templates for oneM2M
*
*/
......@@ -118,7 +118,7 @@ module OneM2M_Templates {
*/
template (value) RequestPrimitive m_retrieveResource(XSD.ID p_targetResourceAddress, in XSD.ID p_originator := PX_AE_ID_STEM) := {
operation := int2,
to_ := f_addPrefix(p_targetResourceAddress),
to_ := p_targetResourceAddress,
from_ := p_originator,
requestIdentifier := "m_retrieveResource" & f_rnd(1, 1000000),
resourceType := omit,
......@@ -149,7 +149,7 @@ module OneM2M_Templates {
*/
template (value) RequestPrimitive m_retrieveResourceAttributeToOption(XSD.ID p_targetResourceAddress, in XSD.ID p_originator := PX_AE_ID_STEM) := {
operation := int2,
to_ := f_addPrefix(p_targetResourceAddress),
to_ := p_targetResourceAddress,
from_ := p_originator,
requestIdentifier := "m_retrieveResourceAttributeOptionTo" & f_rnd(1, 1000000),
resourceType := omit,
......@@ -181,7 +181,7 @@ module OneM2M_Templates {
*/
template (value) RequestPrimitive m_retrieveResourceAttributeContentOption(XSD.ID p_targetResourceAddress, in template (value) AttributeList_1 p_attributeList, in XSD.ID p_originator := PX_AE_ID_STEM ) := {
operation := int2,
to_ := f_addPrefix(p_targetResourceAddress),
to_ := p_targetResourceAddress,
from_ := p_originator,
requestIdentifier := "m_retrieveResourceAttributeContentOption" & f_rnd(1, 1000000),
resourceType := omit,
......@@ -417,7 +417,7 @@ module OneM2M_Templates {
};
template (value) RequestPrimitive m_createAcp(XSD.ID p_parentResourceAddress, in template (omit) XSD.String p_name := c_defaultResourceName, in template (value) ListOfURIs p_acor := PX_ACOR, in template (value) AccessControlOperations p_allowedOperations := int63) modifies m_create := {
to_ := f_addPrefix(p_parentResourceAddress),
to_ := p_parentResourceAddress,
from_ := PX_AE_ID_STEM,
requestIdentifier := "m_createAcp" & f_rnd(1, 1000000),
resourceType := int1,
......@@ -463,7 +463,7 @@ module OneM2M_Templates {
};
template (value) RequestPrimitive m_createContainer(XSD.ID p_parentResourceAddress, in template (omit) XSD.String p_resourceName) modifies m_create := {
to_ := f_addPrefix(p_parentResourceAddress),
to_ := p_parentResourceAddress,
from_ := PX_AE_ID_STEM,
requestIdentifier := "m_createContainer" & f_rnd(1, 1000000),
resourceType := int3,
......@@ -473,7 +473,7 @@ module OneM2M_Templates {
};
template (value) RequestPrimitive m_createContentInstance(XSD.ID p_parentResourceAddress, XSD.String p_primitiveContent) modifies m_create := {
to_ := f_addPrefix(p_parentResourceAddress),
to_ := p_parentResourceAddress,
from_ := "admin:admin",
requestIdentifier := "m_createContentInstance" & f_rnd(1, 1000000),
resourceType := int4,
......@@ -495,7 +495,7 @@ module OneM2M_Templates {
};
template (value) RequestPrimitive m_createGroup(XSD.ID p_parentResourceAddress, in template (omit) XSD.String p_name, in template (omit) AcpType p_accessControlPolicyIDs, in template (value) XSD.AnyURI p_memberId ) modifies m_create := {
to_ := f_addPrefix(p_parentResourceAddress),
to_ := p_parentResourceAddress,
from_ := PX_AE_ID_STEM,
requestIdentifier := "m_createGroup" & f_rnd(1, 1000000),
resourceType := int9,
......@@ -517,7 +517,7 @@ module OneM2M_Templates {
};
template (value) RequestPrimitive m_createPollingChannel(XSD.ID p_parentResourceAddress, in template (value)XSD.ID p_originatorId, in template (omit) AcpType p_accessControlPolicyIDs ) modifies m_create := {
to_ := f_addPrefix(p_parentResourceAddress),
to_ := p_parentResourceAddress,
from_ := p_originatorId,
requestIdentifier := "m_createPollingChannel" & f_rnd(1, 1000000),
resourceType := int15,
......@@ -538,7 +538,7 @@ module OneM2M_Templates {
};
template (value) RequestPrimitive m_createSchedule(XSD.ID p_parentResourceAddress, in template (omit) XSD.String p_name, in template (value) ScheduleEntries p_scheduleElement ) modifies m_create := {
to_ := f_addPrefix(p_parentResourceAddress),
to_ := p_parentResourceAddress,
from_ := PX_AE_ID_STEM,
requestIdentifier := "m_createSchedule" & f_rnd(1, 1000000),
resourceType := int18,
......@@ -570,7 +570,7 @@ module OneM2M_Templates {
};
template (value) RequestPrimitive m_createSubscription(XSD.ID p_parentResourceAddress, in template (omit) XSD.String p_name, in template (value) ListOfURIs p_notificationURI := {"NotInitialized"}) modifies m_create := {
to_ := f_addPrefix(p_parentResourceAddress),
to_ := p_parentResourceAddress,
from_ := PX_AE_ID_STEM,
requestIdentifier := "m_createSubscription" & f_rnd(1, 1000000),
resourceType := int23,
......@@ -619,7 +619,7 @@ module OneM2M_Templates {
template (value) RequestPrimitive m_deleteRequest(XSD.ID p_resourceAddress) := {
operation := int4,
to_ := f_addPrefix(p_resourceAddress),
to_ := p_resourceAddress,
from_ := PX_SUPER_USER,
requestIdentifier := "m_deleteResource" & f_rnd(1, 1000000),
resourceType := omit,
......@@ -2104,24 +2104,5 @@ module OneM2M_Templates {
}//end group ResponsePrimitives
/**
* @desc Get the prefix depending on the addressing format and binding (Temporal funciton as this should be done by TA)
* @param v_address Actual address
* @return Address with prefix
* @verdict
*/
function f_addPrefix(XSD.ID v_address) return XSD.ID {
//TODO Test, to be removed
if(PX_ADDRESSING_FORMAT == e_cseRelative) {
v_address := "/" & v_address;
} else if (PX_ADDRESSING_FORMAT == e_spRelative) {
v_address := "/~" & v_address;
} else {
v_address := "/~" & v_address;
}
return v_address;
}
} // end of module
......@@ -7,7 +7,7 @@
*
* @author ETSI
* @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/OneM2M_Testcases.ttcn $
* $Id: OneM2M_Testcases.ttcn 152 2016-10-26 13:44:06Z carres $
* $Id: OneM2M_Testcases.ttcn 155 2016-10-28 12:08:48Z reinaortega $
* @desc Module containing test cases for oneM2M
*
*/
......@@ -7309,7 +7309,7 @@ module OneM2M_Testcases {
v_request := valueof(m_createAe(PX_APP_ID, -, PX_AE_ID_STEM, "MyAe2", p_poaList));
}
v_request.to_ := f_addPrefix(f_getResourceAddress());
v_request.to_ := f_getResourceAddress();
mcaPort.send(m_request(v_request));
tc_ac.start;
......
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