Assign specific resource names to the corresponding resource types instead of...

Assign specific resource names to the corresponding resource types instead of c_defaultResourceName for all resources
Signed-off-by: Miguel Angel Reina Ortega's avatarMiguel Angel Reina Ortega <miguelangel.reinaortega@etsi.org>
parent 66ce2847
......@@ -7,7 +7,7 @@
*
* @author oneM2M
* @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Templates.ttcn $
* $Id: OneM2M_Templates.ttcn 245 2017-03-27 17:06:27Z reinaortega $
* $Id: OneM2M_Templates.ttcn 249 2017-03-30 12:24:57Z reinaortega $
* @desc Module containing templates for oneM2M
*
*/
......@@ -462,7 +462,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 := {
template (value) RequestPrimitive m_createAcp(XSD.ID p_parentResourceAddress, in template (omit) XSD.String p_name := c_defaultAccessControlPolicyResourceName, in template (value) ListOfURIs p_acor := PX_ACOR, in template (value) AccessControlOperations p_allowedOperations := int63) modifies m_create := {
to_ := p_parentResourceAddress,
from_ := PX_AE_ID_STEM,
requestIdentifier := testcasename() & "-m_createAcp" & f_rnd(1, 1000000),
......@@ -520,7 +520,7 @@ module OneM2M_Templates {
}
};
template (value) RequestPrimitive m_createContainer(XSD.ID p_parentResourceAddress, in template (omit) XSD.String p_resourceName := c_defaultResourceName) modifies m_create := {
template (value) RequestPrimitive m_createContainer(XSD.ID p_parentResourceAddress, in template (omit) XSD.String p_resourceName := c_defaultContainerResourceName) modifies m_create := {
to_ := p_parentResourceAddress,
from_ := PX_AE_ID_STEM,
requestIdentifier := testcasename() & "-m_createContainer" & f_rnd(1, 1000000),
......@@ -1044,7 +1044,7 @@ module OneM2M_Templates {
* @param p_name Resource name
* @param p_accessControlPolicyIds ACP IDs for the AE
*/
template (value) AE_optional m_contentCreateAe (in template (omit) AcpType p_accessControlPolicyIds, in template (omit) XSD.String p_name := c_defaultResourceName, in template (omit) XSD.ID p_appId := PX_APP_ID, in template (omit) PoaList p_poaList) := {
template (value) AE_optional m_contentCreateAe (in template (omit) AcpType p_accessControlPolicyIds, in template (omit) XSD.String p_name := c_defaultAeResourceName, in template (omit) XSD.ID p_appId := PX_APP_ID, in template (omit) PoaList p_poaList) := {
resourceName := p_name,//O
resourceType := omit,//NP
......@@ -1076,7 +1076,7 @@ module OneM2M_Templates {
* @param p_acor Allowed originators
* @param p_allowedOperations Allowed operations
*/
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 := c_defaultAccessControlPolicyResourceName, 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
......@@ -1159,7 +1159,7 @@ module OneM2M_Templates {
in template (omit) MemberType p_memberType := omit,
in template (omit) ConsistencyStrategy p_consistencyStrategy := omit,
in template (omit) ListOfURIs p_membersAccessControlPolicyIDs := omit,
in template (omit) XSD.String p_name := c_defaultResourceName) := {
in template (omit) XSD.String p_name := c_defaultGroupResourceName) := {
resourceName := p_name,//O
resourceType := omit,//NP
resourceID := omit,//NP
......@@ -1189,7 +1189,7 @@ module OneM2M_Templates {
* @param p_name Resource name
* @param p_accessControlPolicyIds ACP IDs for the AE
*/
template (value) MgmtObj_optional m_contentCreateMgmtObj (in template (omit) AcpType p_accessControlPolicyIds := omit, in template (omit) XSD.String p_name := c_defaultResourceName) := {
template (value) MgmtObj_optional m_contentCreateMgmtObj (in template (omit) AcpType p_accessControlPolicyIds := omit, in template (omit) XSD.String p_name := c_defaultMgmtObjResourceName) := {
resourceName := p_name,//O
resourceType := omit,//NP
......@@ -1214,7 +1214,7 @@ module OneM2M_Templates {
* @param p_name Resource name
* @param p_accessControlPolicyIds ACP IDs for the AE
*/
template (value) Node_optional m_contentCreateNode (in template (omit) AcpType p_accessControlPolicyIds := omit, in template (omit) XSD.String p_name := c_defaultResourceName, in template (omit) XSD.ID p_nodeId := "NodeID") := {//TODO Create PX for NodeID
template (value) Node_optional m_contentCreateNode (in template (omit) AcpType p_accessControlPolicyIds := omit, in template (omit) XSD.String p_name := c_defaultNodeResourceName, in template (omit) XSD.ID p_nodeId := "NodeID") := {//TODO Create PX for NodeID
resourceName := p_name,//O
resourceType := omit,//NP
......@@ -1239,7 +1239,7 @@ module OneM2M_Templates {
* @param p_accessControlPolicyIds ACP IDs for the PollingChannel
* @param p_name Resource name
*/
template (value) PollingChannel_optional m_contentCreatePollingChannel (in template (omit) XSD.String p_name := c_defaultResourceName) := {
template (value) PollingChannel_optional m_contentCreatePollingChannel (in template (omit) XSD.String p_name := c_defaultPollingChannelResourceName) := {
resourceName := p_name,//O
resourceType := omit,//NP
resourceID := omit,//NP
......@@ -1256,7 +1256,7 @@ module OneM2M_Templates {
* @param p_name Resource name
*/
template (value) Schedule_optional m_contentCreateSchedule (in template (value) ScheduleEntries p_scheduleElement,
in template (omit) XSD.String p_name := c_defaultResourceName) := {
in template (omit) XSD.String p_name := c_defaultScheduleResourceName) := {
resourceName := p_name,//O
resourceType := omit,//NP
resourceID := omit,//NP
......@@ -1295,7 +1295,7 @@ module OneM2M_Templates {
* @param p_name Resource name
*/
template (value) Subscription_optional m_contentCreateSubscription (in template (value) ListOfURIs p_notificationURI,
in template (omit) XSD.String p_name := c_defaultResourceName) := {
in template (omit) XSD.String p_name := c_defaultSubscriptionResourceName) := {
resourceName := p_name,//O
resourceType := omit,//NP
resourceID := omit,//NP
......@@ -1325,7 +1325,7 @@ module OneM2M_Templates {
};
template (value) Subscription_optional m_contentCreateSubscriptionAdvanced (in template (value) ListOfURIs p_notificationURI,
in template (omit) XSD.String p_name := c_defaultResourceName,
in template (omit) XSD.String p_name := c_defaultSubscriptionResourceName,
in template (omit) EventNotificationCriteria p_eventNotificationCriteria,
in template (omit) XSD.PositiveInteger p_expirationCounter,
in template (omit) BatchNotify p_batchNotify,
......@@ -1371,7 +1371,7 @@ module OneM2M_Templates {
* @param p_primitiveContent Content for the ContentInstance
*/
template (value) ContentInstance_optional m_contentCreateContentInstance(XSD.String p_primitiveContent := "NotInitializedValue") := {
resourceName := c_defaultResourceName,//O
resourceName := c_defaultContentInstanceResourceName,//O
resourceType := omit,//NP
resourceID := omit,//NP
parentID := omit,//NP
......@@ -1399,7 +1399,7 @@ module OneM2M_Templates {
* @desc Base primitiveContent for CREATE operation for Container resource
* @param p_name Resource name
*/
template (value) Container_optional m_contentCreateContainer (in template (omit) XSD.String p_name := c_defaultResourceName):= {
template (value) Container_optional m_contentCreateContainer (in template (omit) XSD.String p_name := c_defaultContainerResourceName):= {
resourceName := p_name,//O
resourceType := omit,//NP
resourceID := omit,//NP
......@@ -1427,7 +1427,7 @@ module OneM2M_Templates {
//@Martin
template (value) LocationPolicy_optional m_contentCreateLocationPolicy (in template (value) LocationSource p_locationSource, in template (omit) AcpType p_accessControlPolicyIds, in template (value) XSD.Duration p_locationUpdatePeriod, in template (value) NodeID p_locationTargetID, in template (value) XSD.AnyURI p_locationServerAddress) := {
resourceName := c_defaultResourceName, //O
resourceName := c_defaultLocationPolicyResourceName, //O
resourceType := omit, //NP
resourceID := omit, //NP
parentID := omit, //NP
......
......@@ -7,7 +7,7 @@
*
* @author oneM2M
* @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_TypesAndValues.ttcn $
* $Id: OneM2M_TypesAndValues.ttcn 234 2017-03-20 16:37:29Z reinaortega $
* $Id: OneM2M_TypesAndValues.ttcn 249 2017-03-30 12:24:57Z reinaortega $
* @desc Module containing types and values for oneM2M
*
*/
......@@ -19,7 +19,19 @@ module OneM2M_TypesAndValues {
/* Constants */
const charstring c_uri_cse := "/~/in-cse/";
const charstring c_cse_name := "in-cse";
const XSD.String c_defaultResourceName := "MyResource";
const XSD.String c_defaultGroupResourceName := "MyGroupResource";
const XSD.String c_defaultAccessControlPolicyResourceName := "MyAccessControlPolicyResource";
const XSD.String c_defaultScheduleResourceName := "MyScheduleResource";
const XSD.String c_defaultPollingChannelResourceName := "MyPollingChannelResource";
const XSD.String c_defaultSubscriptionResourceName := "MySubscriptionResource";
const XSD.String c_defaultContentInstanceResourceName := "MyContentInstanceResource";
const XSD.String c_defaultContainerResourceName := "MyContainerResource";
const XSD.String c_defaultMgmtObjResourceName := "MyMgmtObjResource";
const XSD.String c_defaultAeResourceName := "MyAeResource";
const XSD.String c_defaultLocationPolicyResourceName := "MyLocationPolicyResource";
const XSD.String c_defaultNodeResourceName := "MyNodeResource";
const XSD.ID c_aeAuxName := "MyAe";
const XSD.String c_acpAuxName := "MyAcp";
const charstring c_invalid_location_update_period := "-PT30M10S" ;//duration set to invalid value (minus value)
......
......@@ -7,7 +7,7 @@
*
* @author oneM2M
* @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/OneM2M_Testcases.ttcn $
* $Id: OneM2M_Testcases.ttcn 248 2017-03-29 13:59:41Z reinaortega $
* $Id: OneM2M_Testcases.ttcn 249 2017-03-30 12:24:57Z reinaortega $
* @desc Module containing test cases for oneM2M
*
*/
......@@ -1294,7 +1294,7 @@ module OneM2M_Testcases {
if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.resourceName)){
setverdict(fail, testcasename(), ": Error, resourceName attribute not provided");
} else {
if(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.resourceName != c_defaultResourceName){
if(v_responsePrimitive.primitiveContent.any_1[0].Container_optional.resourceName != c_defaultContainerResourceName){
setverdict(fail, testcasename(), ": Error, resourceName attribute not correct");
}
}
......@@ -1311,7 +1311,7 @@ module OneM2M_Testcases {
if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].Group_optional.resourceName)){
setverdict(fail, testcasename(), ": Error, resourceName attribute not provided");
} else {
if(v_responsePrimitive.primitiveContent.any_1[0].Group_optional.resourceName != c_defaultResourceName){
if(v_responsePrimitive.primitiveContent.any_1[0].Group_optional.resourceName != c_defaultGroupResourceName){
setverdict(fail, testcasename(), ": Error, resourceName attribute not correct");
}
}
......@@ -1328,7 +1328,7 @@ module OneM2M_Testcases {
if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.resourceName)){
setverdict(fail, testcasename(), ": Error, resourceName attribute not provided");
} else {
if(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.resourceName != c_defaultResourceName){
if(v_responsePrimitive.primitiveContent.any_1[0].AccessControlPolicy_optional.resourceName != c_defaultAccessControlPolicyResourceName){
setverdict(fail, testcasename(), ": Error, resourceName attribute not correct");
}
}
......@@ -1345,7 +1345,7 @@ module OneM2M_Testcases {
if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional.resourceName)){
setverdict(fail, testcasename(), ": Error, resourceName attribute not provided");
} else {
if(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional.resourceName != c_defaultResourceName){
if(v_responsePrimitive.primitiveContent.any_1[0].Schedule_optional.resourceName != c_defaultScheduleResourceName){
setverdict(fail, testcasename(), ": Error, resourceName attribute not correct");
}
}
......@@ -1361,7 +1361,7 @@ module OneM2M_Testcases {
if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional.resourceName)){
setverdict(fail, testcasename(), ": Error, resourceName attribute not provided");
} else {
if(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional.resourceName != c_defaultResourceName){
if(v_responsePrimitive.primitiveContent.any_1[0].PollingChannel_optional.resourceName != c_defaultPollingChannelResourceName){
setverdict(fail, testcasename(), ": Error, resourceName attribute not correct");
}
}
......@@ -1378,7 +1378,7 @@ module OneM2M_Testcases {
if(not ispresent(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional.resourceName)){
setverdict(fail, testcasename(), ": Error, resourceName attribute not provided");
} else {
if(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional.resourceName != c_defaultResourceName){
if(v_responsePrimitive.primitiveContent.any_1[0].Subscription_optional.resourceName != c_defaultSubscriptionResourceName){
setverdict(fail, testcasename(), ": Error, resourceName attribute not correct");
}
}
......@@ -10966,7 +10966,7 @@ module OneM2M_Testcases {
// Test adapter configuration
// Preamble
v_createRequest := valueof(m_createAcp(f_getResourceAddress(), c_defaultResourceName, {"testDomain"}));
v_createRequest := valueof(m_createAcp(f_getResourceAddress(), -, {"testDomain"}));
v_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource
v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex].resource)}, -);
......
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