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

Added testcasename to requestIdentifier field + removing whitespaces from attribute values

parent cabf29e6
......@@ -7,7 +7,7 @@
*
* @author ETSI
* @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Functions.ttcn $
* $Id: OneM2M_Functions.ttcn 187 2016-11-29 05:28:52Z berge $
* $Id: OneM2M_Functions.ttcn 189 2016-11-29 07:22:10Z reinaortega $
* @desc Module containing functions for oneM2M
*
*/
......@@ -741,7 +741,7 @@ module OneM2M_Functions {
*/
function f_getCreateRequestPrimitive(in ResourceType p_resourceType, template RequestPrimitive p_request := m_create, integer p_parentIndex) runs on CseTester return RequestPrimitive {
var integer p_locresourceIndex := p_parentIndex;
var template ListOfURIs v_defaultListOfURIs := {"Not Initialized"};
var template ListOfURIs v_defaultListOfURIs := {"NotInitialized"};
p_request.from_ := f_getOriginator(p_parentIndex);
p_request.to_ := f_getResourceAddress(p_parentIndex);
......
......@@ -7,7 +7,7 @@
*
* @author ETSI
* @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Templates.ttcn $
* $Id: OneM2M_Templates.ttcn 179 2016-11-24 10:39:02Z carres $
* $Id: OneM2M_Templates.ttcn 188 2016-11-29 05:33:13Z berge $
* @desc Module containing templates for oneM2M
*
*/
......@@ -339,7 +339,7 @@ module OneM2M_Templates {
operation := int1,
to_ := "NotInitialized",
from_ := "NotInitialized",
requestIdentifier := "m_create" & f_rnd(1, 1000000),
requestIdentifier := testcasename() & "-m_create" & f_rnd(1, 1000000),
resourceType := omit,
primitiveContent := omit,
roleIDs := omit,
......@@ -397,7 +397,7 @@ module OneM2M_Templates {
//Added by @Naum
template (value) RequestPrimitive m_createAe(XSD.ID p_appId, template (omit) AcpType p_accessControlPolicyIDs := omit,template (omit) XSD.ID p_from := omit, template (omit) ResourceName p_resourceName := c_aeAuxName, in template (omit) PoaList p_poaList := omit) modifies m_create := {
from_ := p_from,//PX_AE_ID_STEM,//TODO We should use omit, "s", or "c"
requestIdentifier := "m_createAe" & f_rnd(1, 1000000),
requestIdentifier := testcasename() & "-m_createAe" & f_rnd(1, 1000000),
resourceType := int2,
primitiveContent := {
any_1 := {{AE_optional := m_contentCreateAe(p_accessControlPolicyIDs,p_resourceName, p_appId, p_poaList)}}
......@@ -406,7 +406,7 @@ module OneM2M_Templates {
template (value) RequestPrimitive m_createAeAux(template (omit) AcpType p_accessControlPolicyIDs := omit, in template (omit) PoaList p_poaList) modifies m_create := {
from_ := PX_AE_ID_STEM,//TODO We should use omit, "s", or "c"//@Martin
requestIdentifier := "m_createAe" & f_rnd(1, 1000000),
requestIdentifier := testcasename() & "-m_createAe" & f_rnd(1, 1000000),
resourceType := int2,
primitiveContent := {
any_1 := {{AE_optional := m_contentCreateAe(p_accessControlPolicyIDs, c_aeAuxName, -, p_poaList)}}
......@@ -417,7 +417,7 @@ module OneM2M_Templates {
* @desc Base CREATE request primitive for AccessControlPolicy resource
*/
template (value) RequestPrimitive m_createAcpBase modifies m_create := {
requestIdentifier := "m_createAcp" & f_rnd(1, 1000000),
requestIdentifier := testcasename() & "-m_createAcp" & f_rnd(1, 1000000),
resourceType := int1,
primitiveContent := {
any_1 := {{AccessControlPolicy_optional := m_contentCreateAcp ()}}
......@@ -427,7 +427,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_ := p_parentResourceAddress,
from_ := PX_AE_ID_STEM,
requestIdentifier := "m_createAcp" & f_rnd(1, 1000000),
requestIdentifier := testcasename() & "-m_createAcp" & f_rnd(1, 1000000),
resourceType := int1,
primitiveContent := {
any_1 := {{AccessControlPolicy_optional := m_contentCreateAcp (p_name, p_acor, p_allowedOperations)}}
......@@ -440,7 +440,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 ) modifies m_create := {
from_ := PX_SUPER_USER,
requestIdentifier := "m_createAcpAux" & f_rnd(1, 1000000),
requestIdentifier := testcasename() & "-m_createAcpAux" & f_rnd(1, 1000000),
resourceType := int1,
primitiveContent := {
any_1 := {{AccessControlPolicy_optional := m_contentCreateAcp (p_acpName, p_acor, p_allowedOperations)}}
......@@ -450,7 +450,7 @@ module OneM2M_Templates {
//Added by @Naum
template (value) RequestPrimitive m_createCSEBase (in ServiceSubscribedAppRule p_serviceSubscribedAppRule) modifies m_create := {
from_ := PX_AE_ID_STEM,
requestIdentifier := "m_createCSE" & f_rnd(1, 1000000),
requestIdentifier := testcasename() & "-m_createCSE" & f_rnd(1, 1000000),
resourceType := int1,//FIXME Is this the value for CSEBase? In any case, this template is not used at all
primitiveContent := {
any_1 := {{CSEBase_optional := m_contentCreateCSEBase (p_serviceSubscribedAppRule)}}
......@@ -462,7 +462,7 @@ module OneM2M_Templates {
* @desc Base CREATE request primitive for Container resource
*/
template (value) RequestPrimitive m_createContainerBase modifies m_create := {
requestIdentifier := "m_createContainer" & f_rnd(1, 1000000),
requestIdentifier := testcasename() & "-m_createContainer" & f_rnd(1, 1000000),
resourceType := int3,
primitiveContent := {
......@@ -473,7 +473,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 := {
to_ := p_parentResourceAddress,
from_ := PX_AE_ID_STEM,
requestIdentifier := "m_createContainer" & f_rnd(1, 1000000),
requestIdentifier := testcasename() & "-m_createContainer" & f_rnd(1, 1000000),
resourceType := int3,
primitiveContent := {
any_1 := {{Container_optional := m_contentCreateContainer(p_resourceName)}}
......@@ -483,7 +483,7 @@ module OneM2M_Templates {
template (value) RequestPrimitive m_createContentInstance(XSD.ID p_parentResourceAddress, XSD.String p_primitiveContent) modifies m_create := {
to_ := p_parentResourceAddress,
from_ := "admin:admin",
requestIdentifier := "m_createContentInstance" & f_rnd(1, 1000000),
requestIdentifier := testcasename() & "-m_createContentInstance" & f_rnd(1, 1000000),
resourceType := int4,
primitiveContent := {
any_1 := {{ContentInstance_optional := m_contentCreateContentInstance(p_primitiveContent)}}
......@@ -495,21 +495,21 @@ module OneM2M_Templates {
* @desc Base CREATE request primitive for Group resource
*/
template (value) RequestPrimitive m_createGroupBase modifies m_create := {
requestIdentifier := "m_createGroup" & f_rnd(1, 1000000),
requestIdentifier := testcasename() & "-m_createGroup" & f_rnd(1, 1000000),
resourceType := int9,
primitiveContent := {
any_1 := {{Group_optional := m_contentCreateGroup (1, {"Not Initialized"}, omit, omit)}} //TODO: p_resourceId
any_1 := {{Group_optional := m_contentCreateGroup (1, {"NotInitialized"}, omit, omit)}} //TODO: p_resourceId
}
};
template (value) RequestPrimitive m_createGroup(in template (value) XSD.NonNegativeInteger p_maxNrOfMembers,
in template (value) ListOfURIs p_memberIds := {"Not Initialized"},
in template (value) ListOfURIs p_memberIds := {"NotInitialized"},
in template (omit) AcpType p_accessControlPolicyIDs,
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 := "MyGroup") modifies m_create := {
requestIdentifier := "m_createGroup" & f_rnd(1, 1000000),
requestIdentifier := testcasename() & "-m_createGroup" & f_rnd(1, 1000000),
resourceType := int9,
primitiveContent := {
any_1 := {{Group_optional := m_contentCreateGroup (p_maxNrOfMembers, p_memberIds, p_accessControlPolicyIDs, p_memberType, p_consistencyStrategy, p_membersAccessControlPolicyIDs, p_name)}} //TODO: p_resourceId
......@@ -521,7 +521,7 @@ module OneM2M_Templates {
* @desc Base CREATE request primitive for PollingChannel resource
*/
template (value) RequestPrimitive m_createPollingChannelBase modifies m_create := {
requestIdentifier := "m_createPollingChannel" & f_rnd(1, 1000000),
requestIdentifier := testcasename() & "-m_createPollingChannel" & f_rnd(1, 1000000),
resourceType := int15,
primitiveContent := {
any_1 := {{PollingChannel_optional := m_contentCreatePollingChannel (-)}}
......@@ -531,7 +531,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_ := p_parentResourceAddress,
from_ := p_originatorId,
requestIdentifier := "m_createPollingChannel" & f_rnd(1, 1000000),
requestIdentifier := testcasename() & "-m_createPollingChannel" & f_rnd(1, 1000000),
resourceType := int15,
primitiveContent := {
any_1 := {{PollingChannel_optional := m_contentCreatePollingChannel ()}}
......@@ -542,7 +542,7 @@ module OneM2M_Templates {
* @desc Base CREATE request primitive for Schedule resource
*/
template (value) RequestPrimitive m_createScheduleBase modifies m_create := {
requestIdentifier := "m_createSchedule" & f_rnd(1, 1000000),
requestIdentifier := testcasename() & "-m_createSchedule" & f_rnd(1, 1000000),
resourceType := int18,
primitiveContent := {
any_1 := {{Schedule_optional := m_contentCreateSchedule ({{"0,0,0 1 2,1,1,*"}})}}
......@@ -552,7 +552,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_ := p_parentResourceAddress,
from_ := PX_AE_ID_STEM,
requestIdentifier := "m_createSchedule" & f_rnd(1, 1000000),
requestIdentifier := testcasename() & "-m_createSchedule" & f_rnd(1, 1000000),
resourceType := int18,
primitiveContent := {
any_1 := {{Schedule_optional := m_contentCreateSchedule (p_scheduleElement)}}
......@@ -562,7 +562,7 @@ module OneM2M_Templates {
//Added by @Naum
template (value) RequestPrimitive m_createServiceSubscribedAppRule (in ListOfM2MID p_applicableCredIDs, in ListOfM2MID p_allowedApp_IDs, in ListOfM2MID p_allowedAEs) modifies m_create := {
from_ := PX_AE_ID_STEM,
requestIdentifier := "m_createServiceSubscribedAppRule" & f_rnd(1, 1000000),
requestIdentifier := testcasename() & "-m_createServiceSubscribedAppRule" & f_rnd(1, 1000000),
resourceType := int19,//FIXME Is this the correct value?
primitiveContent := {
any_1 := {{ServiceSubscribedAppRule_optional := m_contentCreateServiceSubscribedAppRule (p_applicableCredIDs, p_allowedApp_IDs, p_allowedAEs)}}
......@@ -574,17 +574,17 @@ module OneM2M_Templates {
* @desc Base CREATE request primitive for Subscription resource
*/
template (value) RequestPrimitive m_createSubscriptionBase modifies m_create := {
requestIdentifier := "m_createSubscription" & f_rnd(1, 1000000),
requestIdentifier := testcasename() & "-m_createSubscription" & f_rnd(1, 1000000),
resourceType := int23,
primitiveContent := {
any_1 := {{Subscription_optional := m_contentCreateSubscription ({"Not Initialized"})}}
any_1 := {{Subscription_optional := m_contentCreateSubscription ({"NotInitialized"})}}
}
};
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_ := p_parentResourceAddress,
from_ := PX_AE_ID_STEM,
requestIdentifier := "m_createSubscription" & f_rnd(1, 1000000),
requestIdentifier := testcasename() & "-m_createSubscription" & f_rnd(1, 1000000),
resourceType := int23,
primitiveContent := {
any_1 := {{Subscription_optional := m_contentCreateSubscription (p_notificationURI, p_name)}}
......@@ -607,7 +607,7 @@ module OneM2M_Templates {
//@Martin
template (value) RequestPrimitive m_createLocationPolicy(in template (value) LocationSource locationSource, in template (omit) AcpType p_accessControlPolicyIDs, in template (omit) XSD.Duration locationUpdatePeriod, in template (omit) NodeID locationTargetID, in template (omit) XSD.AnyURI locationServerAddress) modifies m_create := {
requestIdentifier := "m_createLocationPolicy" & f_rnd(1, 1000000), //the requestIdentifier is supposed to be set similar as "C190XX7T/001" by prepending the AE-ID-Stem and slash(‘/’) in front of it
requestIdentifier := testcasename() & "-m_createLocationPolicy" & f_rnd(1, 1000000), //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(locationSource, p_accessControlPolicyIDs, locationUpdatePeriod, locationTargetID, locationServerAddress) }}
......@@ -616,7 +616,7 @@ module OneM2M_Templates {
};
//@Martin
template (value) RequestPrimitive m_createNotification(in template (value) Representation resourcePresentation, in template (omit)NotificationEventType notifEventType, in template (omit) XSD.AnyURI subscriptionReference, in template (omit) XSD.AnyURI notifForwardingURI) modifies m_create := {
requestIdentifier := "m_createNotification" & f_rnd(1, 1000000),
requestIdentifier := testcasename() & "-m_createNotification" & f_rnd(1, 1000000),
primitiveContent := {
any_1 := {{ Notification := m_contentCreateNotification(resourcePresentation, notifEventType, subscriptionReference, notifForwardingURI)}}
},
......@@ -633,7 +633,7 @@ module OneM2M_Templates {
operation := int4,
to_ := p_resourceAddress,
from_ := PX_SUPER_USER,
requestIdentifier := "m_deleteResource" & f_rnd(1, 1000000),
requestIdentifier := testcasename() & "-m_deleteResource" & f_rnd(1, 1000000),
resourceType := omit,
primitiveContent := omit,
roleIDs := omit,
......@@ -660,7 +660,7 @@ module OneM2M_Templates {
operation := int4,
to_ := p_resourceAddress,
from_ := PX_AE_ID_STEM,
requestIdentifier := "m_deleteAe" & f_rnd(1, 1000000),
requestIdentifier := testcasename() & "-m_deleteAe" & f_rnd(1, 1000000),
resourceType := omit,
primitiveContent := omit,
roleIDs := omit,
......@@ -2093,7 +2093,7 @@ module OneM2M_Templates {
template ResponsePrimitive m_responseNotification(ResponseStatusCode p_statusCode, in template(omit) PrimitiveContent p_notification := omit) := {
responseStatusCode := p_statusCode,
requestIdentifier := "m_responseNotification" & f_rnd(1, 1000000),
requestIdentifier := testcasename() & "-m_responseNotification" & f_rnd(1, 1000000),
primitiveContent := p_notification,
to_ := omit,
from_ := omit,
......
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