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

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
......@@ -7,7 +7,7 @@
*
* @author ETSI
* @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/OneM2M_Functions.ttcn $
* $Id: OneM2M_Functions.ttcn 98 2016-06-02 07:34:39Z reinaortega $
* $Id: OneM2M_Functions.ttcn 99 2016-06-09 15:04:43Z reinaortega $
* @desc Module containing functions for oneM2M
*
*/
......@@ -46,18 +46,25 @@ module OneM2M_Functions {
group preambleFunctions {
function f_preamble_registerAe(in template (value) AccessControlOperations p_allowedOperations := int63) runs on M2M {//c_CRUDNDi
function f_preamble_registerAe(in template (value) AccessControlOperations p_allowedOperations := int63) runs on M2M return integer{//c_CRUDNDi
var RequestPrimitive v_request;
var M2MResponsePrimitive v_response;
var XSD.ID v_acpId := "0";
var integer v_aeAuxIndex := -1;
var integer v_acpAuxIndex := -1;
if(PX_ACP_SUPPORT){
v_acpId := f_createAccessControlPolicyAux(p_allowedOperations := p_allowedOperations);
v_acpAuxIndex := f_createAccessControlPolicyAux(p_allowedOperations := p_allowedOperations);
}
if(v_acpId != "0") {
mcaPort.send(m_request(m_createAeAux({v_acpId})));
if(v_acpAuxIndex != -1) {
vc_resourcesIndexToBeDeleted := {v_acpAuxIndex};
v_request := valueof(m_createAeAux({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)}));
//TODO Test, to be removed
v_request.to_ := f_addPrefix(f_getResourceAddress());
mcaPort.send(m_request(v_request));
//mcaPort.send(m_request(m_createAeAux(p_name, {PX_URI_CSE & PX_CSE_NAME & "/" & c_acpAuxName})));
} else {
mcaPort.send(m_request(m_createAeAux()));
......@@ -67,8 +74,12 @@ module OneM2M_Functions {
[] mcaPort.receive(mw_responseOK) -> value v_response {
tc_ac.stop;
log("Preamble: Application registered successfuly");
if(ischosen(v_response.responsePrimitive_.primitiveContent.any_1[0].AE)) {
vc_aeAux := v_response.responsePrimitive_.primitiveContent.any_1[0].AE;
if(ischosen(v_response.responsePrimitive_.primitiveContent.any_1[0].AE_optional)) {
vc_aeAux := v_response.responsePrimitive_.primitiveContent.any_1[0].AE_optional;
v_aeAuxIndex := f_setResource(v_response.responsePrimitive_.primitiveContent);
vc_resourcesIndexToBeDeleted := vc_resourcesIndexToBeDeleted & {v_aeAuxIndex};
if(ispresent(vc_aeAux.aE_ID)){
f_sendAcPrimitive("AE-ID_changed", oct2char(unichar2oct(vc_aeAux.aE_ID)));
} else {
......@@ -91,6 +102,8 @@ module OneM2M_Functions {
stop;
}
}
return v_aeAuxIndex;
}
......@@ -99,62 +112,45 @@ module OneM2M_Functions {
group postambleFunctions {
function f_postamble_deleteResources() runs on M2M {
var integer i;
var XSD.ID v_resourceAddress;
var M2MResponsePrimitive v_response;
var RequestPrimitive v_request;
if (PX_RUN_POSTAMBLE) {
if(PX_UNSTRUCTURED)
{
v_request := valueof(m_deleteAe("/" & vc_aeAux.aE_ID));
v_request.from_ := vc_aeAux.aE_ID;
mcaPort.send(m_request(v_request));
} else {
mcaPort.send(m_request(m_deleteAe(PX_URI_CSE & PX_CSE_NAME & "/" & c_aeAuxName)));
}
tc_ac.start;
alt {
[] mcaPort.receive(mw_responseOK) {
tc_ac.stop;
log("Postamble: AE Resource deleted");
}
[] mcaPort.receive(mw_responseKO) {
tc_ac.stop;
log("Postamble: Error while deleting resource");
for(i := 0; i < lengthof(vc_resourcesIndexToBeDeleted); i := i + 1) {
v_resourceAddress := f_getResourceAddress(lengthof(vc_resourcesIndexToBeDeleted)-1 - i);
v_request := valueof(m_deleteRequest(v_resourceAddress));
if(PX_FROM_IS_AE_ID){
if(ischosen(vc_resourcesList[i].resource.any_1[0].AccessControlPolicy_optional)) {
v_request.from_ := PX_AE_ID_STEM;
} else {
v_request.from_ := vc_aeAux.aE_ID;
}
}
[] tc_ac.timeout {
log("Postamble: No answer while deleting resource");
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_responseOK) {
tc_ac.stop;
log("Postamble: AE Resource deleted");
}
[] mcaPort.receive(mw_responseKO) {
tc_ac.stop;
log("Postamble: Error while deleting resource");
}
[] tc_ac.timeout {
log("Postamble: No answer while deleting resource");
}
}
}
if(PX_ACP_SUPPORT){
if(PX_UNSTRUCTURED)
{
v_request := valueof(m_deleteAcp("/" & vc_acpAux.resourceID));
v_request.from_ := PX_AE_ID_STEM;
mcaPort.send(m_request(v_request));
} else {
mcaPort.send(m_request(m_deleteAcp(PX_URI_CSE & PX_CSE_NAME & "/" & c_acpAuxName)));
}
tc_ac.start;
alt {
[] mcaPort.receive(mw_responseOK) {
tc_ac.stop;
log("Postamble: ACP Resource deleted");
}
[] mcaPort.receive(mw_responseKO) {
tc_ac.stop;
log("Postamble: Error while deleting resource");
}
[] tc_ac.timeout {
log("Postamble: No answer while deleting resource");
}
}
}
}
f_postamble_default();
}
......@@ -189,20 +185,19 @@ module OneM2M_Functions {
group getSetFunctions {
function f_getCreateRequestPrimitive(in ResourceType p_resourceType, XSD.ID p_aeResourceAddress, in template (omit) AccessControlOperations p_allowedOperations, template RequestPrimitive p_request) runs on M2M return RequestPrimitive {
function f_getCreateRequestPrimitive(in ResourceType p_resourceType, in template (omit) AccessControlOperations p_allowedOperations, template RequestPrimitive p_request, integer p_parentIndex) runs on M2M return RequestPrimitive {
p_request.to_ := p_aeResourceAddress;
//p_request.name := p_name;
p_request.from_ := f_getOriginator(p_parentIndex);
p_request.to_ := f_addPrefix(f_getResourceAddress(p_parentIndex));
//p_request.name := p_name;
if (p_resourceType == int1) {//AccessControlPolicy
}
if (p_resourceType == int9) {//group
if(PX_UNSTRUCTURED) {
p_request.primitiveContent.any_1[0].Group_optional := m_contentCreateGroup (1, {"/" & vc_aeAux.resourceID}, omit);
} else {
p_request.primitiveContent.any_1[0].Group_optional.memberIDs := {PX_CSE_ID & "/" & PX_CSE_NAME & "/" & c_aeAuxName};//vc_aeAux.resourceID
}
p_request.primitiveContent.any_1[0].Group_optional.memberIDs := {f_getResourceAddress(p_parentIndex)};
}
if (p_resourceType == int15) {//pollingChannel
......@@ -210,7 +205,9 @@ module OneM2M_Functions {
}
if (p_resourceType == int23) {//subscription
if(PX_FROM_IS_AE_ID) {
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 {
......@@ -218,15 +215,18 @@ module OneM2M_Functions {
}
} else {
p_request.primitiveContent.any_1[0].Subscription_optional.notificationURI := {"/" & PX_CSE_NAME & "/" & c_aeAuxName};
}
}*/
}
return valueof(p_request);
}
function f_getUpdateRequestPrimitive(in ResourceType p_resourceType, XSD.ID p_resourceAddress, template RequestPrimitive p_request) runs on M2M return RequestPrimitive {
function f_getUpdateRequestPrimitive(in ResourceType p_resourceType, integer p_resourceIndex, template RequestPrimitive p_request) runs on M2M return RequestPrimitive {
p_request.to_ := p_resourceAddress;
p_request.from_ := f_getOriginator(p_resourceIndex);
p_request.to_ := f_addPrefix(f_getResourceAddress(p_resourceIndex));
//p_request.name := p_name;
if (p_resourceType == int3) {//Container
......@@ -275,34 +275,150 @@ module OneM2M_Functions {
if(ischosen(p_contentResource.any_1[0].Group_optional)) {
return p_contentResource.any_1[0].Group_optional.resourceID;
}
if(ischosen(p_contentResource.any_1[0].AE_optional)) {
return p_contentResource.any_1[0].AE_optional.resourceID;
}
return "1";
}
function f_getResourceName(PrimitiveContent p_contentResource) return XSD.ID {
if(ischosen(p_contentResource.any_1[0].AccessControlPolicy_optional)) {
return p_contentResource.any_1[0].AccessControlPolicy_optional.resourceName;
}
if(ischosen(p_contentResource.any_1[0].Container_optional)) {
return p_contentResource.any_1[0].Container_optional.resourceName;
}
if(ischosen(p_contentResource.any_1[0].Schedule_optional)) {
return p_contentResource.any_1[0].Schedule_optional.resourceName;
}
if(ischosen(p_contentResource.any_1[0].PollingChannel_optional)) {
return p_contentResource.any_1[0].PollingChannel_optional.resourceName;
}
if(ischosen(p_contentResource.any_1[0].Subscription_optional)) {
return p_contentResource.any_1[0].Subscription_optional.resourceName;
}
if(ischosen(p_contentResource.any_1[0].Group_optional)) {
return p_contentResource.any_1[0].Group_optional.resourceName;
}
if(ischosen(p_contentResource.any_1[0].AE_optional)) {
return p_contentResource.any_1[0].AE_optional.resourceName;
}
return "1";
}
function f_getAttribute(in MyAttributeList p_attributeList, in XSD.NCName p_attributeName) return Attribute {
function f_getOriginator(integer p_targetResourceIndex := -1) runs on M2M return XSD.AnyURI {
if(p_targetResourceIndex == -1) {
return PX_AE_ID_STEM;
}
if(PX_FROM_IS_AE_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_getOriginator(vc_resourcesList[p_targetResourceIndex].parentIndex);
}
} else {
return PX_AE_ID_STEM;
}
}
function f_getAttribute(in AttributeList p_attributeList, in XSD.NCName p_attributeName) return integer {
var integer i;
var Attribute v_attribute := {-, -};
for (i:=0; i < lengthof(p_attributeList); i := i + 1){
if(p_attributeList[i].name == p_attributeName){
if(p_attributeList[i] == p_attributeName){
return i;
}
}
return v_attribute;
return -1;
}
function f_getResourceAddress(integer p_targetResourceIndex := -1) runs on M2M return XSD.ID {
var XSD.ID v_resourceAddress;
if(PX_ADDRESSING_FORMAT == e_cseRelative) {
if(PX_UNSTRUCTURED) {
if(p_targetResourceIndex == -1) {
return "";
} else {
return f_getResourceId(vc_resourcesList[p_targetResourceIndex].resource);
}
} else {
if(p_targetResourceIndex == -1) {
return PX_CSE_NAME;
} else {
v_resourceAddress := f_getResourceAddress(vc_resourcesList[p_targetResourceIndex].parentIndex) & "/" & f_getResourceName(vc_resourcesList[p_targetResourceIndex].resource);
return v_resourceAddress;
}
}
} else if (PX_ADDRESSING_FORMAT == e_spRelative) {
if(PX_UNSTRUCTURED) {
if(p_targetResourceIndex == -1) {
return "/" & PX_CSE_ID;
} else {
v_resourceAddress := f_getResourceAddress() & "/" & f_getResourceId(vc_resourcesList[p_targetResourceIndex].resource);
return v_resourceAddress;
}
} else {
if(p_targetResourceIndex == -1) {
return "/" & PX_CSE_ID & "/" & PX_CSE_NAME;
} else {
v_resourceAddress := f_getResourceAddress(vc_resourcesList[p_targetResourceIndex].parentIndex) & "/" & f_getResourceName(vc_resourcesList[p_targetResourceIndex].resource);
return v_resourceAddress;
}
}
} else if (PX_ADDRESSING_FORMAT == e_absolute) {
if(PX_UNSTRUCTURED) {
if(p_targetResourceIndex == -1) {
return "";
} else {
return "";
}
} else {
if(p_targetResourceIndex == -1) {
return "";
} else {
return "";
}
}
} else {
return "";
}
}
function f_setResource(PrimitiveContent p_resource, integer p_parentIndex := -1) runs on M2M return integer {
if(isbound(vc_resourcesList)) {
vc_resourcesList[lengthof(vc_resourcesList)] := {p_parentIndex, p_resource};
} else {
vc_resourcesList[0] := {p_parentIndex, p_resource};
}
return lengthof(vc_resourcesList)-1;
}
}//end group getSetFunctions
group helpingFunctions {
function f_createResource(in ResourceType p_resourceType, XSD.ID p_parentResourceAddress, template RequestPrimitive p_requestPrimitive) runs on M2M return RequestPrimitive {
function f_createResource(in ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive, integer p_parentIndex := -1) runs on M2M return integer {
var M2MResponsePrimitive v_response;
var RequestPrimitive v_request;
var XSD.ID v_resourceId;
var integer v_resourceIndex := -1;
v_request := f_getCreateRequestPrimitive(p_resourceType,p_parentResourceAddress, omit, p_requestPrimitive);
v_request := f_getCreateRequestPrimitive(p_resourceType, omit, p_requestPrimitive, p_parentIndex);
mcaPort.send(m_request(v_request));
tc_ac.start;
......@@ -310,7 +426,7 @@ module OneM2M_Functions {
[] mcaPort.receive(mw_responseOK) -> value v_response {
tc_ac.stop;
setverdict(pass, "f_createResource: Resource type " & int2str(enum2int(p_resourceType)) & " created successfuly");
vc_resourceId := f_getResourceId(v_response.responsePrimitive_.primitiveContent);
v_resourceIndex := f_setResource(v_response.responsePrimitive_.primitiveContent, p_parentIndex);
}
[] mcaPort.receive(mw_responseKO) {
tc_ac.stop;
......@@ -325,24 +441,27 @@ module OneM2M_Functions {
}
}
return v_request;
return v_resourceIndex;
}
function f_createAccessControlPolicyAux(in template (value) XSD.String p_acpName := "MyAcp", in template (value) AccessControlOperations p_allowedOperations := int63) runs on M2M return XSD.ID{
function f_createAccessControlPolicyAux(in template (value) XSD.String p_acpName := "MyAcp", in template (value) AccessControlOperations p_allowedOperations := int63) runs on M2M return integer{
var RequestPrimitive v_request;
var M2MResponsePrimitive v_response;
var XSD.ID v_acpId;
mcaPort.send(m_request(m_createAcpAux(p_acpName := p_acpName, p_allowedOperations := p_allowedOperations)));
var integer v_acpAuxIndex := -1;
v_request := valueof(m_createAcpAux(p_acpName := p_acpName, p_allowedOperations := p_allowedOperations));
v_request.to_ := f_addPrefix(f_getResourceAddress());
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_responseOK) -> value v_response {
tc_ac.stop;
setverdict(pass, "f_createAccessControlPolicy: Resource type " & int2str(1) & " created successfuly");
v_acpId := f_getResourceId(v_response.responsePrimitive_.primitiveContent);
vc_acpAux := v_response.responsePrimitive_.primitiveContent.any_1[0].AccessControlPolicy_optional;
return v_acpId;
v_acpAuxIndex := f_setResource(v_response.responsePrimitive_.primitiveContent);
vc_acpAux := v_response.responsePrimitive_.primitiveContent.any_1[0].AccessControlPolicy_optional;//TODO To be removed
}
[] mcaPort.receive(mw_responseKO) {
tc_ac.stop;
......@@ -357,26 +476,27 @@ module OneM2M_Functions {
}
}
return "0";
return v_acpAuxIndex;
}
function f_createContainerResourceAux (XSD.ID p_parentResourceAddress) runs on M2M return RequestPrimitive {
function f_createContainerResourceAux (XSD.ID p_parentResourceAddress, integer p_parentIndex := -1) runs on M2M return integer {
var M2MResponsePrimitive v_response;
var RequestPrimitive v_request;
var XSD.ID v_acpId;
var integer v_acpAuxIndex := -1;
var integer v_containerResourceIndex := -1;
v_acpId := f_createAccessControlPolicyAux(p_acpName := "MyAcp_2");
v_acpAuxIndex := f_createAccessControlPolicyAux(p_acpName := "MyAcp_2");
v_request := valueof(m_createContainerBase);
v_request.primitiveContent.any_1[0].Container_optional.accessControlPolicyIDs := {v_acpId};
v_request.primitiveContent.any_1[0].Container_optional.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)};
v_request.primitiveContent.any_1[0].Container_optional.resourceName := "MyContainerAux";
f_createResource(int3, p_parentResourceAddress, v_request );
v_containerResourceIndex := f_createResource(int3, v_request, p_parentIndex);
return v_request;
return v_containerResourceIndex;
}
......@@ -385,11 +505,11 @@ module OneM2M_Functions {
v_request := valueof(m_updateAcpBase);
v_request.to_ := p_acpAddress;
v_request.to_ := f_addPrefix(p_acpAddress);
v_request.primitiveContent.any_1[0].AccessControlPolicy_optional.privileges.accessControlRule_list := {
{
accessControlOriginators := {"*"}, //{"admin:admin"}
accessControlOperations := p_allowedOperations,
accessControlOriginators := PX_ACOR, //{"admin:admin"}
accessControlOperations := valueof(p_allowedOperations),
accessControlContexts_list := omit
}
};
......@@ -417,7 +537,8 @@ module OneM2M_Functions {
acPort.send(AcRequestPrimitive:{event, {charstring := v_data}});
}
}//end group helpingFunctions
......
......@@ -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 ) := {