Commit 0c90e94f authored by oneM2MTester Develop Team's avatar oneM2MTester Develop Team
Browse files

update LOC TC

parent 74a28320
......@@ -65,7 +65,7 @@ module OneM2M_Functions {
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})));
//mcaPort.send(m_request(m_createAeAux(p_name, {PX_URI_CSE & PX_CSE_NAME & "/" & PX_ACPAUX_NAME})));
  • AcpAux, AeAux and defaultResourceName should not be a PX. It's a constant because we (the Test System) chooses the name independently of the IUT

    Edited by Miguel Angel Reina Ortega
Please register or sign in to reply
} else {
mcaPort.send(m_request(m_createAeAux()));
}
......@@ -190,7 +190,11 @@ module OneM2M_Functions {
p_request.from_ := f_getOriginator(p_parentIndex);
p_request.to_ := f_addPrefix(f_getResourceAddress(p_parentIndex));
p_request.to_ := f_addPrefix(f_getResourceAddress(p_parentIndex));
//@Martin
p_request.resultContent := PX_RESULT_CONTENT_CREATE;
p_request.requestIdentifier := valueof(p_request.from_) & f_rnd(1, 1000000);//p_request.from_ & int2str(float2int(rnd()));
//p_request.name := p_name;
......@@ -215,7 +219,7 @@ module OneM2M_Functions {
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 & "/" & c_aeAuxName};
p_request.primitiveContent.any_1[0].Subscription_optional.notificationURI := {"/" & PX_CSE_NAME & "/" & PX_AEAUX_NAME};//c_aeAuxName
}*/
}
......@@ -224,11 +228,14 @@ module OneM2M_Functions {
function f_getUpdateRequestPrimitive(in ResourceType p_resourceType, integer p_resourceIndex, template RequestPrimitive p_request) runs on M2M return RequestPrimitive {
p_request.from_ := f_getOriginator(p_resourceIndex);
p_request.from_ := f_getOriginator(p_resourceIndex);
p_request.to_ := f_addPrefix(f_getResourceAddress(p_resourceIndex));
p_request.to_ := f_addPrefix(f_getResourceAddress(p_resourceIndex));
//p_request.name := p_name;
//@Martin
p_request.resultContent := PX_RESULT_CONTENT_UPDATE;
p_request.requestIdentifier := valueof(p_request.from_) & f_rnd(1, 1000000);//p_request.from_ & int2str(float2int(rnd()));
//p_request.name := p_name;
if (p_resourceType == int3) {//Container
......@@ -445,8 +452,8 @@ module OneM2M_Functions {
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 integer{
// "MyAcp"
function f_createAccessControlPolicyAux(in template (value) XSD.String p_acpName := PX_ACPAUX_NAME, in template (value) AccessControlOperations p_allowedOperations := int63) runs on M2M return integer{
var RequestPrimitive v_request;
var M2MResponsePrimitive v_response;
var integer v_acpAuxIndex := -1;
......@@ -489,7 +496,7 @@ module OneM2M_Functions {
var integer v_acpAuxIndex := -1;
var integer v_containerResourceIndex := -1;
v_acpAuxIndex := f_createAccessControlPolicyAux(p_acpName := "MyAcp_2");
v_acpAuxIndex := f_createAccessControlPolicyAux(p_acpName := PX_ACPAUX_NAME);//"MyAcp_2"
v_request := valueof(m_createContainerBase);
v_request.primitiveContent.any_1[0].Container_optional.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)};
......
......@@ -16,40 +16,60 @@ module OneM2M_Pixits {
import from XSD all;
import from OneM2M_Types all;
modulepar boolean PX_DELETE_CREATED_RESOURCES := true;
modulepar boolean PX_DELETE_CREATED_RESOURCES := true;
modulepar charstring PX_RESOURCE_TO_BE_DELETED := "/ae_test";
modulepar charstring PX_RESOURCE_TO_BE_DELETED := "/ae_test";
modulepar XSD.IDREFS PX_RESOURCES_TO_BE_DELETED := {"/ae_test", "/MyAcp"};
modulepar charstring PX_HOST_ADDRESS := "127.0.0.1:8080";
modulepar charstring PX_HOST_ADDRESS := "127.0.0.1:8080";
modulepar charstring PX_XML_NAMESPACE := "om2m=""http://www.onem2m.org/xml/protocols""";
modulepar charstring PX_XML_NAMESPACE := "om2m=""http://www.onem2m.org/xml/protocols""";
modulepar charstring PX_CSE_NAME := "in-cse";
modulepar charstring PX_CSE_NAME := "in-cse";
modulepar charstring PX_URI_CSE := "/~/in-cse";
modulepar charstring PX_URI_CSE := "/~/in-cse";
modulepar boolean PX_UNSTRUCTURED := false;
//@Martin
modulepar charstring PX_DEFAULT_RESOURCE_NAME := "MyResource";//c_defaultResourceName
//@Martin
modulepar charstring PX_AEAUX_NAME := "MyAe";
//@Martin
modulepar XSD.String PX_ACPAUX_NAME := "MyAcp";
modulepar charstring PX_AE_ID_STEM := "admin:admin";
modulepar boolean PX_UNSTRUCTURED := false;
modulepar charstring PX_APP_ID := "myAppId";
modulepar charstring PX_AE_ID_STEM := "admin:admin";
modulepar boolean PX_RUN_POSTAMBLE := true;
modulepar charstring PX_APP_ID := "myAppId";
modulepar ListOfURIs PX_ACOR := {"*"};
modulepar boolean PX_RUN_POSTAMBLE := true;
modulepar ListOfURIs PX_ACOR := {"*"};
modulepar AddressingFormat PX_ADDRESSING_FORMAT := e_cseRelative;
modulepar charstring PX_SERIALIZATION := "JSON";
modulepar charstring PX_SERIALIZATION := "JSON";
modulepar charstring PX_PROTOCOL_BINDING := "HTTP";
modulepar boolean PX_ACP_SUPPORT := true;
modulepar charstring PX_PROTOCOL_BINDING := "HTTP";
modulepar charstring PX_CSE_ID := "in-cse";
modulepar boolean PX_ACP_SUPPORT := true;
modulepar boolean PX_FROM_IS_AE_ID := false;
modulepar charstring PX_CSE_ID := "in-cse";
//@Martin
//constant parameters for LOC
modulepar LocationSource PX_LOCATION_SOURCE := int1;//network-defined
modulepar charstring PX_LOCATION_TARGET_ID := "{LOCATION-TARGET-ID}"; //SUPPOSE TO BE RECEIVED FROM LOCATION SERVER
modulepar charstring PX_LOCATION_SERVER_ADDRESS := "{LOCATION-SERVER-ADDRESS}";
modulepar charstring PX_LOCATION_UPDATE_PERIOD := "PT10M10S" ;//10 Minute 10 Seconds
modulepar charstring PX_LOCATION_UPDATE_PERIOD_INVALID := "-PT30M10S" ;//duration set to invalid value (minus value)
modulepar charstring PX_LOCATION_CONTAINER_NAME := "myLoContainer";
modulepar ResultContent PX_RESULT_CONTENT_CREATE := int1; //default value for resultContent and permitted input value includes int0, int1, int2, and int3
modulepar ResultContent PX_RESULT_CONTENT_UPDATE := int1; //default value for resultContent and permitted input value includes int0, int1
modulepar boolean PX_FROM_IS_AE_ID := false;
modulepar Labels LABELS := {"VALUE_1"};
} // end of module
......@@ -52,7 +52,7 @@ module OneM2M_Templates {
*/
template (value) RequestPrimitive m_retrieveCseBase := {
operation := int2,
to_ := c_uri_cse,
to_ := PX_URI_CSE,//c_uri_cse,//@Martin
from_ := "admin:admin",
requestIdentifier := "m_retrieveCseBase" & f_rnd(1, 1000000),
resourceType := omit,
......@@ -341,12 +341,12 @@ module OneM2M_Templates {
};
//@Martin
template (value) RequestPrimitive m_updateLocationPolicy(XSD.ID p_aeResourceAddress, in template (omit) AcpType p_accessControlPolicyIDs, in template (omit) XSD.Duration locationUpdatePeriod) := {
template (value) RequestPrimitive m_updateLocationPolicy(XSD.ID p_locResourceAddress, in template (omit) AcpType p_accessControlPolicyIDs, in template (omit) XSD.Duration locationUpdatePeriod) := {
operation := int3, //create
to_ := p_aeResourceAddress,
to_ := p_locResourceAddress,
from_ := PX_AE_ID_STEM, //AE originator id e.g.
requestIdentifier := "m_updateLocationPolicy",
resourceType := omit,
resourceType := omit,//NP
primitiveContent := {
any_1 := {{ LocationPolicy_optional := m_contentUpdateLocationPolicy(p_accessControlPolicyIDs, locationUpdatePeriod) }}
},
......@@ -357,7 +357,7 @@ module OneM2M_Templates {
operationExecutionTime := omit,
responseType := omit,
resultPersistence := omit,
resultContent := int1,//omit,
resultContent := PX_RESULT_CONTENT_UPDATE,
eventCategory := omit,
deliveryAggregation := omit,
groupRequestIdentifier := omit,
......@@ -406,7 +406,7 @@ module OneM2M_Templates {
requestIdentifier := "m_createAe" & f_rnd(1, 1000000),
resourceType := int2,
primitiveContent := {
any_1 := {{AE_optional := m_contentCreateAe(c_aeAuxName, p_accessControlPolicyIDs)}}
any_1 := {{AE_optional := m_contentCreateAe(PX_AEAUX_NAME, p_accessControlPolicyIDs)}}
},
role := omit,
originatingTimestamp := omit,
......@@ -449,7 +449,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) := {
template (value) RequestPrimitive m_createAcp(XSD.ID p_parentResourceAddress, in template (omit) XSD.String p_name := PX_DEFAULT_RESOURCE_NAME, in template (value) ListOfURIs p_acor := PX_ACOR, in template (value) AccessControlOperations p_allowedOperations := int63) := {
operation := int1,
to_ := f_addPrefix(p_parentResourceAddress),
from_ := PX_AE_ID_STEM,
......@@ -474,7 +474,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 ) := {
template (value) RequestPrimitive m_createAcpAux(in template (value) XSD.String p_acpName := PX_ACPAUX_NAME, in template (value) ListOfURIs p_acor := PX_ACOR, in template (value) AccessControlOperations p_allowedOperations := int63 ) := {
operation := int1,
to_ := "Not Initialized",
from_ := PX_AE_ID_STEM,
......@@ -778,11 +778,11 @@ module OneM2M_Templates {
};
//@Martin
template (value) RequestPrimitive m_createLocationPolicy(XSD.ID p_aeResourceAddress, in template (omit) AcpType p_accessControlPolicyIDs, in template (omit) XSD.Duration locationUpdatePeriod, in template (omit) NodeID locationTargetID, in template (omit) XSD.AnyURI locationServerAddress) := {
template (value) RequestPrimitive m_createLocationPolicy(XSD.ID p_parentResourceAddress, in template (omit) AcpType p_accessControlPolicyIDs, in template (omit) XSD.Duration locationUpdatePeriod, in template (omit) NodeID locationTargetID, in template (omit) XSD.AnyURI locationServerAddress) := {
operation := int1, //create
to_ := p_aeResourceAddress,
to_ := p_parentResourceAddress,
from_ := PX_AE_ID_STEM, //AE originator id e.g.
requestIdentifier := "m_createLocationPolicy",
requestIdentifier := "m_createLocationPolicy", //the requestIdentifier is supposed to be set similar as "C190XX7T/001" by prepending the AE-ID-Stem and slash(‘/’) in front of it
resourceType := int10,
primitiveContent := {
any_1 := {{ LocationPolicy_optional := m_contentCreateLocationPolicy(p_accessControlPolicyIDs, locationUpdatePeriod, locationTargetID, locationServerAddress) }}
......@@ -794,7 +794,7 @@ module OneM2M_Templates {
operationExecutionTime := omit,
responseType := omit,
resultPersistence := omit,
resultContent := int1,//omit,
resultContent := PX_RESULT_CONTENT_CREATE,
eventCategory := omit,
deliveryAggregation := omit,
groupRequestIdentifier := omit,
......@@ -880,7 +880,7 @@ module OneM2M_Templates {
choice := omit//NP
};
template (value) AccessControlPolicy_optional m_contentCreateAcp (in template (omit) XSD.String p_name := c_defaultResourceName, in template (value) ListOfURIs p_acor := PX_ACOR, in template (value) AccessControlOperations p_allowedOperations := int63 ) := {
template (value) AccessControlPolicy_optional m_contentCreateAcp (in template (omit) XSD.String p_name := PX_DEFAULT_RESOURCE_NAME, in template (value) ListOfURIs p_acor := PX_ACOR, in template (value) AccessControlOperations p_allowedOperations := int63 ) := {
resourceName := p_name,//O
resourceType := omit,//NP
resourceID := omit,//NP
......@@ -915,7 +915,7 @@ module OneM2M_Templates {
template (value) Group_optional m_contentCreateGroup ( in template (value) XSD.NonNegativeInteger p_maxNrOfMembers,
in template (value) ListOfURIs p_memberIds,
in template (omit) AcpType p_accessControlPolicyIDs) := {
resourceName := c_defaultResourceName,//O
resourceName := PX_DEFAULT_RESOURCE_NAME,//O
resourceType := omit,//NP
resourceID := omit,//NP
parentID := omit,//NP
......@@ -940,7 +940,7 @@ module OneM2M_Templates {
};
template (value) PollingChannel_optional m_contentCreatePollingChannel ( in template (omit) AcpType p_accessControlPolicyIDs) := {
resourceName := c_defaultResourceName,//O
resourceName := PX_DEFAULT_RESOURCE_NAME,//O
resourceType := omit,//NP
resourceID := omit,//NP
parentID := omit,//NP
......@@ -953,7 +953,7 @@ module OneM2M_Templates {
};
template (value) Schedule_optional m_contentCreateSchedule (in template (value) ScheduleEntries p_scheduleElement) := {
resourceName := c_defaultResourceName,//O
resourceName := PX_DEFAULT_RESOURCE_NAME,//O
resourceType := omit,//NP
resourceID := omit,//NP
parentID := omit,//NP
......@@ -968,7 +968,7 @@ module OneM2M_Templates {
};
template (value) Subscription_optional m_contentCreateSubscription (in template (value) ListOfURIs p_notificationURI) := {
resourceName := c_defaultResourceName,//O
resourceName := PX_DEFAULT_RESOURCE_NAME,//O
resourceType := omit,//NP
resourceID := omit,//NP
parentID := omit,//NP
......@@ -996,7 +996,7 @@ module OneM2M_Templates {
};
template (value) ContentInstance_optional m_contentCreateContentInstance(XSD.String p_primitiveContent) := {
resourceName := c_defaultResourceName,//O
resourceName := PX_DEFAULT_RESOURCE_NAME,//O
resourceType := omit,//NP
resourceID := omit,//NP
parentID := omit,//NP
......@@ -1019,7 +1019,7 @@ module OneM2M_Templates {
};
template (value) Container_optional m_contentCreateContainer := {
resourceName := c_defaultResourceName,//O
resourceName := PX_DEFAULT_RESOURCE_NAME,//O
resourceType := omit,//NP
resourceID := omit,//NP
parentID := omit,//NP
......@@ -1046,23 +1046,23 @@ module OneM2M_Templates {
//@Martin
template (value) LocationPolicy_optional m_contentCreateLocationPolicy (in template (omit) AcpType p_accessControlPolicyIDs, in template (value) XSD.Duration locationUpdatePeriod, in template (value) NodeID locationTargetID, in template (value) XSD.AnyURI locationServerAddress) := {
resourceName := c_defaultResourceName, //O
resourceName := PX_DEFAULT_RESOURCE_NAME, //O
resourceType := omit, //NP
resourceID := omit, //NP
parentID := omit, //NP
creationTime := omit, //NP
lastModifiedTime := omit, //NP
labels := {"location_test"}, //O
labels := LABELS,//O
accessControlPolicyIDs := p_accessControlPolicyIDs, //O
expirationTime := omit, //O
announceTo := omit, //O
announcedAttribute := omit, //O
locationSource := int1, //Network_based //M
locationSource := PX_LOCATION_SOURCE, //M
locationUpdatePeriod := locationUpdatePeriod, //O
locationTargetID := locationTargetID, //O
locationServer := locationServerAddress,//O
locationContainerID := omit, //NP
locationContainerName := omit, //O
locationContainerName := PX_LOCATION_CONTAINER_NAME,//O
locationStatus := omit, //NP
choice := omit //NP
......@@ -1250,7 +1250,7 @@ module OneM2M_Templates {
parentID := omit,//NP
creationTime := omit,//NP
lastModifiedTime := omit,//NP
labels := {"location_test"},//O
labels := LABELS,//O
accessControlPolicyIDs := p_accessControlPolicyIDs,//O
expirationTime := omit,//O
announceTo := omit,//O
......@@ -1260,7 +1260,7 @@ module OneM2M_Templates {
locationTargetID := omit, //NP
locationServer := omit, //NP
locationContainerID := omit, //NP
locationContainerName := omit, //O
locationContainerName := PX_LOCATION_CONTAINER_NAME, //O
locationStatus := omit, //NP
choice := omit //NP
};
......
This diff is collapsed.
......@@ -17,11 +17,11 @@ module OneM2M_TypesAndValues {
import from OneM2M_Types all;
/* Constants */
const charstring c_uri_cse := "/~/in-cse/";
const charstring c_cse_name := "in-cse";
const XSD.String c_defaultResourceName := "MyResource";
const charstring c_aeAuxName := "MyAe";
const XSD.String c_acpAuxName := "MyAcp";
//const charstring c_uri_cse := "/~/in-cse/";
//const charstring c_cse_name := "in-cse";
//const XSD.String c_defaultResourceName := "MyResource";
//const charstring c_aeAuxName := "MyAe";
//const XSD.String c_acpAuxName := "MyAcp";
//AccessControlOperations
const XSD.Integer c_C := 1;
......
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