Output from oneM2M Plugtests#2 (part 3) - Handling of generation of addresses...

Output from oneM2M Plugtests#2 (part 3) - Handling of generation of addresses depending on the address format + selection of originator
parent 1f56801f
This diff is collapsed.
......@@ -7,7 +7,7 @@
*
* @author ETSI
* @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/OneM2M_Pixits.ttcn $
* $Id: OneM2M_Pixits.ttcn 97 2016-06-01 15:38:10Z reinaortega $
* $Id: OneM2M_Pixits.ttcn 99 2016-06-09 15:04:43Z reinaortega $
* @desc Module containing Pixits for oneM2M
*
*/
......@@ -40,13 +40,15 @@ module OneM2M_Pixits {
modulepar ListOfURIs PX_ACOR := {"*"};
modulepar AddressingFormat PX_ADDRESSING_FORMAT := e_cseRelative;
modulepar charstring PX_SERIALIZATION := "JSON";
modulepar charstring PX_PROTOCOL_BINDING := "HTTP";
modulepar boolean PX_ACP_SUPPORT := true;
modulepar charstring PX_CSE_ID := "/in-cse";
modulepar charstring PX_CSE_ID := "in-cse";
modulepar boolean PX_FROM_IS_AE_ID := false;
......
......@@ -7,7 +7,7 @@
*
* @author ETSI
* @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/OneM2M_Templates.ttcn $
* $Id: OneM2M_Templates.ttcn 97 2016-06-01 15:38:10Z reinaortega $
* $Id: OneM2M_Templates.ttcn 99 2016-06-09 15:04:43Z reinaortega $
* @desc Module containing templates for oneM2M
*
*/
......@@ -19,6 +19,7 @@ module OneM2M_Templates {
import from OneM2M_TypesAndValues all;
//import from OneM2M_AdditionalTypes all;
import from OneM2M_Pixits all;
import from OneM2M_Functions all;
function f_rnd(in integer p_lower, in integer p_upper) return charstring {
......@@ -73,7 +74,7 @@ module OneM2M_Templates {
template (value) RequestPrimitive m_retrieveResource(XSD.ID p_targetResourceAddress) := {
operation := int2,
to_ := p_targetResourceAddress,
to_ := f_addPrefix(p_targetResourceAddress),
from_ := PX_AE_ID_STEM,
requestIdentifier := "m_retrieveResource" & f_rnd(1, 1000000),
resourceType := omit,
......@@ -95,7 +96,7 @@ module OneM2M_Templates {
template (value) RequestPrimitive m_retrieveResourceAttributeToOption(XSD.ID p_targetResourceAddress) := {
operation := int2,
to_ := p_targetResourceAddress,
to_ := f_addPrefix(p_targetResourceAddress),
from_ := PX_AE_ID_STEM,
requestIdentifier := "m_retrieveResourceAttributeOptionTo" & f_rnd(1, 1000000),
resourceType := omit,
......@@ -117,7 +118,7 @@ module OneM2M_Templates {
template (value) RequestPrimitive m_retrieveResourceAttributeContentOption(XSD.ID p_targetResourceAddress, in template (value) AttributeList_1 p_attributeList) := {
operation := int2,
to_ := p_targetResourceAddress,
to_ := f_addPrefix(p_targetResourceAddress),
from_ := PX_AE_ID_STEM,
requestIdentifier := "m_retrieveResourceAttributeContentOption" & f_rnd(1, 1000000),
resourceType := omit,
......@@ -191,7 +192,7 @@ module OneM2M_Templates {
template (value) RequestPrimitive m_updateContainer(XSD.ID p_targetResourceAddress, in template (omit) XSD.String p_resourceName) := {
operation := int3,
to_ := p_targetResourceAddress,
to_ := f_addPrefix(p_targetResourceAddress),
from_ := PX_AE_ID_STEM,
requestIdentifier := "m_updateContainer" & f_rnd(1, 1000000),
resourceType := omit,
......@@ -374,8 +375,8 @@ module OneM2M_Templates {
template (value) RequestPrimitive m_createAeAux(template (omit) AcpType p_accessControlPolicyIDs := omit ) := {
operation := int1,
to_ := PX_URI_CSE & PX_CSE_NAME,
from_ := PX_AE_ID_STEM,//TODO We should use omit, "s", or "c"
to_ := "Not Initialized",
from_ := omit,//PX_AE_ID_STEM,//TODO We should use omit, "s", or "c"
requestIdentifier := "m_createAe" & f_rnd(1, 1000000),
resourceType := int2,
primitiveContent := {
......@@ -424,7 +425,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) := {
operation := int1,
to_ := p_parentResourceAddress,
to_ := f_addPrefix(p_parentResourceAddress),
from_ := PX_AE_ID_STEM,
requestIdentifier := "m_createAcp" & f_rnd(1, 1000000),
resourceType := int1,
......@@ -449,7 +450,7 @@ module OneM2M_Templates {
template (value) RequestPrimitive m_createAcpAux(in template (value) XSD.String p_acpName := c_acpAuxName, in template (value) ListOfURIs p_acor := PX_ACOR, in template (value) AccessControlOperations p_allowedOperations := int63 ) := {
operation := int1,
to_ := PX_URI_CSE & PX_CSE_NAME,
to_ := "Not Initialized",
from_ := PX_AE_ID_STEM,
requestIdentifier := "m_createAcp" & f_rnd(1, 1000000),
resourceType := int1,
......@@ -500,7 +501,7 @@ module OneM2M_Templates {
template (value) RequestPrimitive m_createContainer(XSD.ID p_parentResourceAddress, in template (omit) XSD.String p_resourceName) := {
operation := int1,
to_ := p_parentResourceAddress,
to_ := f_addPrefix(p_parentResourceAddress),
from_ := PX_AE_ID_STEM,
requestIdentifier := "m_createContainer" & f_rnd(1, 1000000),
resourceType := int3,
......@@ -525,7 +526,7 @@ module OneM2M_Templates {
template (value) RequestPrimitive m_createContentInstance(XSD.ID p_parentResourceAddress, XSD.String p_primitiveContent) := {
operation := int1,
to_ := p_parentResourceAddress,
to_ := f_addPrefix(p_parentResourceAddress),
from_ := "admin:admin",
requestIdentifier := "m_createContentInstance" & f_rnd(1, 1000000),
resourceType := int4,
......@@ -575,7 +576,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 ) := {
operation := int1,
to_ := p_parentResourceAddress,
to_ := f_addPrefix(p_parentResourceAddress),
from_ := PX_AE_ID_STEM,
requestIdentifier := "m_createGroup" & f_rnd(1, 1000000),
resourceType := int9,
......@@ -625,7 +626,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 ) := {
operation := int1,
to_ := p_parentResourceAddress,
to_ := f_addPrefix(p_parentResourceAddress),
from_ := p_originatorId,
requestIdentifier := "m_createPollingChannel" & f_rnd(1, 1000000),
resourceType := int15,
......@@ -677,7 +678,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 ) := {
operation := int1,
to_ := p_parentResourceAddress,
to_ := f_addPrefix(p_parentResourceAddress),
from_ := PX_AE_ID_STEM,
requestIdentifier := "m_createSchedule" & f_rnd(1, 1000000),
resourceType := int18,
......@@ -727,7 +728,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 ) := {
operation := int1,
to_ := p_parentResourceAddress,
to_ := f_addPrefix(p_parentResourceAddress),
from_ := PX_AE_ID_STEM,
requestIdentifier := "m_createSubscription" & f_rnd(1, 1000000),
resourceType := int23,
......@@ -753,9 +754,9 @@ module OneM2M_Templates {
group Delete {
template (value) RequestPrimitive m_deleteAe(XSD.ID p_aeResourceAddress) := {
template (value) RequestPrimitive m_deleteRequest(XSD.ID p_resourceAddress) := {
operation := int4,
to_ := p_aeResourceAddress,
to_ := f_addPrefix(p_resourceAddress),
from_ := PX_AE_ID_STEM,
requestIdentifier := "m_deleteAe" & f_rnd(1, 1000000),
resourceType := omit,
......@@ -776,13 +777,13 @@ module OneM2M_Templates {
};
template (value) RequestPrimitive m_deleteAcp(XSD.ID p_resourceId) := {
operation := int4,
to_ := p_resourceId,
from_ := PX_AE_ID_STEM,
requestIdentifier := "m_deleteAcp" & f_rnd(1, 1000000),
resourceType := omit,
primitiveContent := omit,
template (value) RequestPrimitive m_delete(XSD.ID p_resourceAddress) := {
operation := int4,
to_ := p_resourceAddress,
from_ := PX_AE_ID_STEM,
requestIdentifier := "m_deleteAe" & f_rnd(1, 1000000),
resourceType := omit,
primitiveContent := omit,
role := omit,
originatingTimestamp := omit,
requestExpirationTimestamp := omit,
......@@ -797,7 +798,8 @@ module OneM2M_Templates {
filterCriteria := omit,
discoveryResultType := omit
};
};
}//end group Delete
}//end group RequestPrimitives
......@@ -821,7 +823,7 @@ module OneM2M_Templates {
pointOfAccess := {"http://127.0.0.1:1400/monitor"},//O //{"http://192.168.1.92:18080/notifications/AE"}, // TODO: Check this => AE PoA
ontologyRef := omit,//O
nodeLink := omit,//NP
requestReachability := false,//M
requestReachability := true,//M
contentSerialization := omit,//O
choice := omit//NP
};
......@@ -1827,6 +1829,21 @@ module OneM2M_Templates {
}
};
}//end group ResponsePrimitives
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_TestSystem.ttcn $
* $Id: OneM2M_TestSystem.ttcn 97 2016-06-01 15:38:10Z reinaortega $
* $Id: OneM2M_TestSystem.ttcn 99 2016-06-09 15:04:43Z reinaortega $
* @desc Test System module for oneM2M
*
*/
......@@ -42,9 +42,10 @@ module OneM2M_TestSystem {
timer tc_ac := PX_TAC;
timer tc_wait;
//global variables
var AE vc_aeAux;
var AE_optional vc_aeAux;//TODO To be removed
var AccessControlPolicy_optional vc_acpAux;
var XSD.ID vc_resourceId := "0";//TODO Clean it, I put it here cause the function f_createResource was already returning another value
var MyResourcesList vc_resourcesList;
var IntegerList vc_resourcesIndexToBeDeleted;
}
type component M2MSystem {
......
This diff is collapsed.
......@@ -7,7 +7,7 @@
*
* @author ETSI
* @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/OneM2M_Types.ttcn $
* $Id: OneM2M_Types.ttcn 98 2016-06-02 07:34:39Z reinaortega $
* $Id: OneM2M_Types.ttcn 99 2016-06-09 15:04:43Z reinaortega $
* @desc Test System module for oneM2M
*
*/
......@@ -4401,9 +4401,20 @@ group invalidTypes {
type NhURI ParentID;
//FIXME Must match the type of the response content when retrieving specific attributes
type record of Attribute MyAttributeList;
type record MyResource {
integer parentIndex,
PrimitiveContent resource
};
type record of MyResource MyResourcesList;
type record of integer IntegerList;
type enumerated AddressingFormat {
e_cseRelative,
e_spRelative,
e_absolute
}
}
}
......
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