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

Adding PX_AE1_ID_STEM and PX_AE2_ID_STEM replacing PX_AE_ID_STEM


Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parent 4e4fb14d
......@@ -7,7 +7,7 @@
*
* @author oneM2M
* @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Functions.ttcn $
* $Id: OneM2M_Functions.ttcn 283 2017-05-19 05:31:55Z reinaortega $
* $Id: OneM2M_Functions.ttcn 286 2017-05-19 06:25:02Z reinaortega $
* @desc Module containing functions for oneM2M
*
*/
......@@ -295,7 +295,7 @@ module OneM2M_Functions {
function f_cse_preamble_subscriptionVerification(out CseTester p_notifyHandler,in integer p_aeIndex, inout integer p_ae2Index, inout template RequestPrimitive p_createRequestPrimitive,in ResourceType p_resourceType ) runs on CseTester {
if(p_resourceType == int23){
p_notifyHandler := CseTester.create("NotifyHandler") alive;
p_ae2Index := f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE_ID_STEM, "MyAe2", {"http://" & PX_AE2_ADDRESS & "/"}), -1); // AE2 is registred
p_ae2Index := f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE2_ID_STEM, "MyAe2", {"http://" & PX_AE2_ADDRESS & "/"}), -1); // AE2 is registred
if(ischosen(p_createRequestPrimitive.primitiveContent.any_1[0].Subscription_optional)){ //this condition is necessary for Subscription TCs where notification URI is set in m_createSubscriptionAdvanced
p_createRequestPrimitive.primitiveContent.any_1[0].Subscription_optional.notificationURI := {f_getResourceAddress(p_ae2Index)};
}
......
......@@ -7,7 +7,7 @@
*
* @author oneM2M
* @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Pixits.ttcn $
* $Id: OneM2M_Pixits.ttcn 283 2017-05-19 05:31:55Z reinaortega $
* $Id: OneM2M_Pixits.ttcn 286 2017-05-19 06:25:02Z reinaortega $
* @desc Module containing Pixits for oneM2M
*
*/
......@@ -44,7 +44,9 @@ module OneM2M_Pixits {
modulepar boolean PX_UNSTRUCTURED := false;
modulepar XSD.ID PX_AE_ID_STEM := "";
modulepar XSD.ID PX_AE1_ID_STEM := "";
modulepar XSD.ID PX_AE2_ID_STEM := "";
modulepar XSD.ID PX_SUPER_USER := "admin:admin";
......
......@@ -7,7 +7,7 @@
*
* @author oneM2M
* @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Templates.ttcn $
* $Id: OneM2M_Templates.ttcn 274 2017-05-17 09:44:46Z reinaortega $
* $Id: OneM2M_Templates.ttcn 286 2017-05-19 06:25:02Z reinaortega $
* @desc Module containing templates for oneM2M
*
*/
......@@ -254,7 +254,6 @@ module OneM2M_Templates {
* @desc Base UPDATE request primitive for Ae resource
*/
template (value) RequestPrimitive m_updateAeBase modifies m_update:= {
from_ := PX_AE_ID_STEM,
requestIdentifier := "m_updateAe" & f_rnd(1, 1000000),
primitiveContent:= {
any_1 := {{AE_optional := m_contentUpdateAe}}
......@@ -265,7 +264,6 @@ module OneM2M_Templates {
* @desc Base UPDATE request primitive for Container resource
*/
template (value) RequestPrimitive m_updateContainerBase modifies m_update:= {
from_ := PX_AE_ID_STEM,
requestIdentifier := "m_updateContainer" & f_rnd(1, 1000000),
primitiveContent:= {
any_1 := {{Container_optional := m_contentUpdateContainer}}
......@@ -277,7 +275,6 @@ module OneM2M_Templates {
* @desc Base UPDATE request primitive for ContentInstance resource
*/
template (value) RequestPrimitive m_updateContentInstanceBase modifies m_update:= {
from_ := PX_AE_ID_STEM,
requestIdentifier := "m_updateContentInstance" & f_rnd(1, 1000000),
primitiveContent:= {
any_1 := {{ContentInstance_optional := m_contentUpdateContentInstance}}
......@@ -288,7 +285,6 @@ module OneM2M_Templates {
* @desc Base UPDATE request primitive for AccessControlPolicy resource
*/
template (value) RequestPrimitive m_updateAcpBase modifies m_update := {
from_ := PX_AE_ID_STEM,
requestIdentifier := "m_updateAcp" & f_rnd(1, 1000000),
primitiveContent:= {
any_1 := {{AccessControlPolicy_optional := m_contentUpdateAcp}}
......@@ -296,7 +292,6 @@ module OneM2M_Templates {
};
template (value) RequestPrimitive m_updateAcpPrivileges(in template(omit) SetOfAcrs p_privileges := omit, in template(omit) SetOfAcrs p_selfPrivileges := omit) modifies m_update := {
from_ := PX_AE_ID_STEM,
requestIdentifier := "m_updateAcp" & f_rnd(1, 1000000),
primitiveContent:= {
any_1 := {{AccessControlPolicy_optional := m_contentUpdateAcpPrivileges(p_privileges, p_selfPrivileges)}}
......@@ -307,7 +302,6 @@ module OneM2M_Templates {
* @desc Base UPDATE request primitive for Group resource
*/
template (value) RequestPrimitive m_updateGroupBase modifies m_update := {
from_ := PX_AE_ID_STEM,
requestIdentifier := "m_updateGroup" & f_rnd(1, 1000000),
primitiveContent:= {
any_1 := {{Group_optional := m_contentUpdateGroup}}
......@@ -318,7 +312,6 @@ module OneM2M_Templates {
* @desc Base UPDATE request primitive for Schedule resource
*/
template (value) RequestPrimitive m_updateScheduleBase modifies m_update := {
from_ := PX_AE_ID_STEM,
requestIdentifier := "m_updateSchedule" & f_rnd(1, 1000000),
primitiveContent:= {
any_1 := {{Schedule_optional := m_contentUpdateSchedule}}
......@@ -329,7 +322,6 @@ module OneM2M_Templates {
* @desc Base UPDATE request primitive for PollingChannel resource
*/
template (value) RequestPrimitive m_updatePollingChannelBase modifies m_update := {
from_ := PX_AE_ID_STEM,
requestIdentifier := "m_updatePollingChannel" & f_rnd(1, 1000000),
primitiveContent:= {
any_1 := {{PollingChannel_optional := m_contentUpdatePollingChannel}}
......@@ -340,7 +332,6 @@ module OneM2M_Templates {
* @desc Base UPDATE request primitive for Subscription resource
*/
template (value) RequestPrimitive m_updateSubscriptionBase modifies m_update := {
from_ := PX_AE_ID_STEM,
requestIdentifier := "m_updateSubscription" & f_rnd(1, 1000000),
primitiveContent:= {
any_1 := {{Subscription_optional := m_contentUpdateSubscription}}
......@@ -350,7 +341,6 @@ module OneM2M_Templates {
//@Martin
template (value) RequestPrimitive m_updateLocationPolicy(XSD.ID p_locResourceAddress, in template (omit) AcpType p_accessControlPolicyIds, in template (omit) XSD.Duration p_locationUpdatePeriod) modifies m_update := {
to_ := p_locResourceAddress,
from_ := PX_AE_ID_STEM, //AE originator id e.g.
requestIdentifier := "m_updateLocationPolicy",
primitiveContent := {
any_1 := {{ LocationPolicy_optional := m_contentUpdateLocationPolicy(p_accessControlPolicyIds, p_locationUpdatePeriod) }}
......@@ -469,7 +459,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
from_ := PX_AE1_ID_STEM,//TODO We should use omit, "s", or "c"//@Martin
requestIdentifier := testcasename() & "-m_createAe" & f_rnd(1, 1000000),
resourceType := int2,
primitiveContent := {
......@@ -490,7 +480,7 @@ module OneM2M_Templates {
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,
from_ := PX_SUPER_USER,
requestIdentifier := testcasename() & "-m_createAcp" & f_rnd(1, 1000000),
resourceType := int1,
primitiveContent := {
......@@ -525,7 +515,7 @@ module OneM2M_Templates {
//Added by @Naum
template (value) RequestPrimitive m_createCSEBase (in ServiceSubscribedAppRule p_serviceSubscribedAppRule) modifies m_create := {
from_ := PX_AE_ID_STEM,
from_ := PX_SUPER_USER,
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 := {
......@@ -557,7 +547,6 @@ module OneM2M_Templates {
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),
resourceType := int3,
primitiveContent := {
......@@ -811,7 +800,6 @@ 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 := testcasename() & "-m_createSchedule" & f_rnd(1, 1000000),
resourceType := int18,
primitiveContent := {
......@@ -840,7 +828,6 @@ module OneM2M_Templates {
};
template (value) RequestPrimitive m_createServiceSubscribedAppRule (in ListOfM2MID p_applicableCredIDs, in ListOfM2MID p_allowedAppIDs, in ListOfM2MID p_allowedAEs) modifies m_create := {
from_ := PX_AE_ID_STEM,
requestIdentifier := testcasename() & "-m_createServiceSubscribedAppRule" & f_rnd(1, 1000000),
resourceType := int19,//FIXME Is this the correct value?
primitiveContent := {
......@@ -862,7 +849,6 @@ 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 := {"NotInitialized"}) modifies m_create := {
to_ := p_parentResourceAddress,
from_ := PX_AE_ID_STEM,
requestIdentifier := testcasename() & "-m_createSubscription" & f_rnd(1, 1000000),
resourceType := int23,
primitiveContent := {
......@@ -965,33 +951,6 @@ module OneM2M_Templates {
};
template (value) RequestPrimitive m_delete(XSD.ID p_resourceAddress) := {
operation := int4,
to_ := p_resourceAddress,
from_ := PX_AE_ID_STEM,
requestIdentifier := testcasename() & "-m_deleteAe" & f_rnd(1, 1000000),
resourceType := omit,
primitiveContent := omit,
roleIDs := omit,
originatingTimestamp := omit,
requestExpirationTimestamp := omit,
resultExpirationTimestamp := omit,
operationExecutionTime := omit,
responseType := omit,
resultPersistence := omit,
resultContent := omit,
eventCategory := omit,
deliveryAggregation := omit,
groupRequestIdentifier := omit,
filterCriteria := omit,
discoveryResultType := omit,
tokens := omit,
tokenIDs := omit,
localTokenIDs := omit,
tokenRequestIndicator := omit
};
}//end group Delete
group Notify {
......
......@@ -7,7 +7,7 @@
*
* @author oneM2M
* @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/OneM2M_Testcases.ttcn $
* $Id: OneM2M_Testcases.ttcn 285 2017-05-19 05:58:02Z reinaortega $
* $Id: OneM2M_Testcases.ttcn 286 2017-05-19 06:25:02Z reinaortega $
* @desc Module containing test cases for oneM2M
*
*/
......@@ -1374,7 +1374,7 @@ module OneM2M_Testcases {
for (i := 0; i<v_sizeResourceTypeList; i := i+1){
if(match(int23, p_requestPrimitiveList[i].resourceType)){
v_ae2Index := f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE_ID_STEM, "MyAe2", v_poaList), -1); // AE2 is registred
v_ae2Index := f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE2_ID_STEM, "MyAe2", v_poaList), -1); // AE2 is registred
p_requestPrimitiveList[i].primitiveContent.any_1[0].Subscription_optional.notificationURI := {f_getResourceAddress(v_ae2Index)};
p_notifyHandler.start(f_subscriptionVerificationHandler(f_getResourceAddress(v_parentIndex)));
}
......@@ -1384,7 +1384,7 @@ module OneM2M_Testcases {
// Test Body
if(match(int23, p_requestPrimitive.resourceType)){
v_ae2Index := f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE_ID_STEM, "MyAe2", v_poaList), -1); // AE2 is registred
v_ae2Index := f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE2_ID_STEM, "MyAe2", v_poaList), -1); // AE2 is registred
p_requestPrimitive.primitiveContent.any_1[0].Subscription_optional.notificationURI := {f_getResourceAddress(v_ae2Index)};
p_notifyHandler.start(f_subscriptionVerificationHandler(f_getResourceAddress(v_parentIndex)));
}
......@@ -10114,7 +10114,7 @@ module OneM2M_Testcases {
// Preamble
v_aeIndex_1 := f_cse_preamble_registerAe(-, -); //c_CRUDNDi
v_aeIndex_2 := f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE_ID_STEM, "MyAe2", omit), -1); // AE2 is registred
v_aeIndex_2 := f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE2_ID_STEM, "MyAe2", omit), -1); // AE2 is registred
v_memberIDs := {f_getResourceId(vc_resourcesList[v_aeIndex_1].resource), f_getResourceId(vc_resourcesList[v_aeIndex_2].resource)};
v_groupIndex := f_cse_createResource(int9, m_createGroup(2, v_memberIDs, omit, int2), -1);
......@@ -10196,7 +10196,7 @@ module OneM2M_Testcases {
// Preamble
v_aeIndex_1 := f_cse_preamble_registerAe(-, -); //c_CRUDNDi
v_aeIndex_2 := f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE_ID_STEM, "MyAe2", omit), -1); // AE2 is registred
v_aeIndex_2 := f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE2_ID_STEM, "MyAe2", omit), -1); // AE2 is registred
v_acpIndex := f_cse_createResource(int1, v_createAcp, -1); // AE child resource
v_containerIndex_1 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex_1); // AE1 child resource
v_containerIndex_2 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex_2); // AE2 child resource
......@@ -10282,7 +10282,7 @@ module OneM2M_Testcases {
// Preamble
v_aeIndex_1 := f_cse_preamble_registerAe(-, -); //c_CRUDNDi
v_aeIndex_2 := f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE_ID_STEM, "MyAe2", omit), -1); // AE2 is registred
v_aeIndex_2 := f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE2_ID_STEM, "MyAe2", omit), -1); // AE2 is registred
v_acpIndex := f_cse_createResource(int1, v_createAcp, -1); // AE child resource
v_containerIndex_1 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex_1); // AE1 child resource
v_containerIndex_2 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex_2); // AE2 child resource
......@@ -10584,7 +10584,7 @@ module OneM2M_Testcases {
// Preamble
v_aeIndex := f_cse_preamble_registerAe(omit,omit);//c_CUDNDi);
v_ae2Index := f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE_ID_STEM, "MyAe2", {f_getAnnoucementTargetPoA("HTTP", PX_AE2_ADDRESS, "")}), -1);
v_ae2Index := f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE2_ID_STEM, "MyAe2", {f_getAnnoucementTargetPoA("HTTP", PX_AE2_ADDRESS, "")}), -1);
v_request := f_getCreateRequestPrimitive(int23, v_createRequest, v_aeIndex);//Subscription
v_request.primitiveContent.any_1[0].Subscription_optional.notificationURI := {f_getResourceAddress(v_ae2Index)};
......@@ -10643,7 +10643,7 @@ module OneM2M_Testcases {
// Preamble
v_aeIndex := f_cse_preamble_registerAe(omit,omit);//c_CUDNDi); // set poa to MTC adress
v_ae2Index := f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE_ID_STEM, "MyAe2", {f_getAnnoucementTargetPoA("HTTP", PX_AE2_ADDRESS, "")}));
v_ae2Index := f_cse_createResource(int2, m_createAe(PX_APP_ID, -, PX_AE2_ID_STEM, "MyAe2", {f_getAnnoucementTargetPoA("HTTP", PX_AE2_ADDRESS, "")}));
v_request := f_getCreateRequestPrimitive(int23, v_createRequest, v_aeIndex);//Subscription
v_request.primitiveContent.any_1[0].Subscription_optional.notificationURI := {f_getResourceAddress(v_ae2Index)};
......
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