Skip to content
Snippets Groups Projects
Commit 41a87828 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

m_createRemoteCSEBase corrected -> CSE-ID attribute +

m_createSubscriptionAdvanced corrected -> Addition of pendingNotification as parameter +
m_batchNotify renaming +
Correspoding adaptation to test cases

Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parent c1eaf554
No related branches found
No related tags found
No related merge requests found
...@@ -553,7 +553,7 @@ module OneM2M_Templates { ...@@ -553,7 +553,7 @@ module OneM2M_Templates {
/** /**
* @desc Base CREATE request primitive for remoteCSE resource * @desc Base CREATE request primitive for remoteCSE resource
*/ */
template (value) RequestPrimitive m_createRemoteCSEBase(template (omit) AcpType p_accessControlPolicyIds := omit, template (omit) ResourceName p_resourceName := c_defaultRemoteCSEResourceName, in template (omit) XSD.AnyURI p_cSEBase := PX_CSE1_ID, in template (omit) XSD.ID p_cSE_ID := PX_CSE_ID) modifies m_create := { template (value) RequestPrimitive m_createRemoteCSEBase(template (omit) AcpType p_accessControlPolicyIds := omit, template (omit) ResourceName p_resourceName := c_defaultRemoteCSEResourceName, in template (omit) XSD.AnyURI p_cSEBase := PX_CSE1_ID, in template (omit) XSD.ID p_cSE_ID := PX_CSE1_ID) modifies m_create := {
requestIdentifier := testcasename() & "-m_createRemoteCSE" & f_rnd(1, 1000000), requestIdentifier := testcasename() & "-m_createRemoteCSE" & f_rnd(1, 1000000),
resourceType := int16, resourceType := int16,
primitiveContent := {remoteCSE := m_contentCreateRemoteCSE(p_resourceName, p_accessControlPolicyIds,p_cSEBase, p_cSE_ID)} primitiveContent := {remoteCSE := m_contentCreateRemoteCSE(p_resourceName, p_accessControlPolicyIds,p_cSEBase, p_cSE_ID)}
...@@ -833,8 +833,9 @@ module OneM2M_Templates { ...@@ -833,8 +833,9 @@ module OneM2M_Templates {
in template (omit) BatchNotify p_batchNotify := omit, in template (omit) BatchNotify p_batchNotify := omit,
in template (omit) XSD.Boolean p_latestNotify := omit, in template (omit) XSD.Boolean p_latestNotify := omit,
in template (omit) XSD.AnyURI p_subscriberURI := omit, in template (omit) XSD.AnyURI p_subscriberURI := omit,
in template (omit) NotificationContentType p_notificationContentType := int1) modifies m_createSubscription := { in template (omit) NotificationContentType p_notificationContentType := int1,
primitiveContent := {subscription := m_contentCreateSubscriptionAdvanced (p_notificationURI, p_name, p_eventNotificationCriteria, p_expirationCounter, p_batchNotify, p_latestNotify, p_subscriberURI, p_notificationContentType)} in template (omit) PendingNotification p_pendingNotification) modifies m_createSubscription := {
primitiveContent := {subscription := m_contentCreateSubscriptionAdvanced (p_notificationURI, p_name, p_eventNotificationCriteria, p_expirationCounter, p_batchNotify, p_latestNotify, p_subscriberURI, p_notificationContentType, p_pendingNotification)}
}; };
/** /**
...@@ -1496,10 +1497,12 @@ module OneM2M_Templates { ...@@ -1496,10 +1497,12 @@ module OneM2M_Templates {
in template (omit) BatchNotify p_batchNotify, in template (omit) BatchNotify p_batchNotify,
in template (omit) XSD.Boolean p_latestNotify, in template (omit) XSD.Boolean p_latestNotify,
in template (omit) XSD.AnyURI p_subscriberURI, in template (omit) XSD.AnyURI p_subscriberURI,
in template (omit) NotificationContentType p_notificationContentType) modifies m_contentCreateSubscription := { in template (omit) NotificationContentType p_notificationContentType,
in template (omit) PendingNotification p_pendingNotification) modifies m_contentCreateSubscription := {
eventNotificationCriteria := p_eventNotificationCriteria,//O eventNotificationCriteria := p_eventNotificationCriteria,//O
expirationCounter := p_expirationCounter,//O expirationCounter := p_expirationCounter,//O
batchNotify := p_batchNotify,//O batchNotify := p_batchNotify,//O
pendingNotification := p_pendingNotification,//O
latestNotify := p_latestNotify,//O latestNotify := p_latestNotify,//O
notificationContentType := p_notificationContentType, //TODO Set to omit once xsd is fixed,//O notificationContentType := p_notificationContentType, //TODO Set to omit once xsd is fixed,//O
subscriberURI := p_subscriberURI//O subscriberURI := p_subscriberURI//O
...@@ -1521,9 +1524,9 @@ module OneM2M_Templates { ...@@ -1521,9 +1524,9 @@ module OneM2M_Templates {
notificationEventType_list := p_notificationEventType_list// TODO this list should be able to be omited see 9.6.8 (TS0001) notificationEventType_list := p_notificationEventType_list// TODO this list should be able to be omited see 9.6.8 (TS0001)
}; };
template (value) BatchNotify m_batchNotifyNumber3Duration1 (in XSD.NonNegativeInteger p_number) := { template (value) BatchNotify m_batchNotify (in XSD.NonNegativeInteger p_number) := {
number := p_number, number := p_number,
duration := "PT1S" //TODO duration has to be set to 1s and match to the Duration regex duration := "PT5S" //TODO duration has to be set to 1s and match to the Duration regex
}; };
//normaly duration can be omited //normaly duration can be omited
...@@ -1606,7 +1609,7 @@ module OneM2M_Templates { ...@@ -1606,7 +1609,7 @@ module OneM2M_Templates {
* @desc Base primitiveContent for CREATE operation for Container resource * @desc Base primitiveContent for CREATE operation for Container resource
* @param p_name Resource name * @param p_name Resource name
*/ */
template (value) RemoteCSE_optional m_contentCreateRemoteCSE (in template (omit) XSD.String p_name := c_defaultRemoteCSEResourceName, in template (omit) AcpType p_accessControlPolicyIds, in template (omit) XSD.AnyURI p_cSEBase := PX_CSE1_ID, in template (omit) XSD.ID p_cSE_ID := PX_CSE_ID):= { template (value) RemoteCSE_optional m_contentCreateRemoteCSE (in template (omit) XSD.String p_name := c_defaultRemoteCSEResourceName, in template (omit) AcpType p_accessControlPolicyIds, in template (omit) XSD.AnyURI p_cSEBase := PX_CSE1_ID, in template (omit) XSD.ID p_cSE_ID := PX_CSE1_ID):= {
resourceName := p_name,//O resourceName := p_name,//O
resourceType := omit,//NP resourceType := omit,//NP
resourceID := omit,//NP resourceID := omit,//NP
......
...@@ -2218,7 +2218,6 @@ module OneM2M_Testcases { ...@@ -2218,7 +2218,6 @@ module OneM2M_Testcases {
p_parentRequestPrimitive.primitiveContent.subscription.notificationURI := {f_getResourceAddress(v_ae2Index)}; p_parentRequestPrimitive.primitiveContent.subscription.notificationURI := {f_getResourceAddress(v_ae2Index)};
p_notifyHandler.start(f_cse_notifyProcedure_subscriptionVerificationHandler(v_parentIndex)); p_notifyHandler.start(f_cse_notifyProcedure_subscriptionVerificationHandler(v_parentIndex));
} }
v_parentIndex := f_cse_createResource(valueof(p_parentRequestPrimitive.resourceType), p_parentRequestPrimitive, v_parentIndex);
if(ischosen(p_parentRequestPrimitive.primitiveContent.group_)){ if(ischosen(p_parentRequestPrimitive.primitiveContent.group_)){
...@@ -2226,6 +2225,8 @@ module OneM2M_Testcases { ...@@ -2226,6 +2225,8 @@ module OneM2M_Testcases {
} }
v_parentIndex := f_cse_createResource(valueof(p_parentRequestPrimitive.resourceType), p_parentRequestPrimitive, v_parentIndex);
} else {//Resource under CSEBase } else {//Resource under CSEBase
if(p_resourceType != int1) { if(p_resourceType != int1) {
...@@ -16369,8 +16370,8 @@ module OneM2M_Testcases { ...@@ -16369,8 +16370,8 @@ module OneM2M_Testcases {
// Preamble // Preamble
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, m_eventNotificationCriteria({int3}, -)); v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, m_eventNotificationCriteria({int3}), -, omit, omit, omit, -, omit);
f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23); f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23);
v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex);//Subscription v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex);//Subscription
...@@ -16581,7 +16582,7 @@ module OneM2M_Testcases { ...@@ -16581,7 +16582,7 @@ module OneM2M_Testcases {
f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23); f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23);
v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)},omit,omit,m_batchNotifyNumber3Duration1(numberOfAggregatedNotification));// TODO fix the duration v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)},omit,omit,m_batchNotify(numberOfAggregatedNotification), omit, omit, -, int2);
v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex);//Subscription v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex);//Subscription
...@@ -16597,7 +16598,8 @@ module OneM2M_Testcases { ...@@ -16597,7 +16598,8 @@ module OneM2M_Testcases {
f_cse_updateResource(v_request); f_cse_updateResource(v_request);
v_updateRequest := m_updateAeBase; v_updateRequest := m_updateAeBase;
v_updateRequest.primitiveContent.aE.labels := v_labels_2; v_updateRequest.requestIdentifier := "m_updateAe" & f_rnd(1, 1000000);
v_updateRequest.primitiveContent.aE.appName := "MyAppName2";
v_request:= f_getUpdateRequestPrimitive(int2, v_aeIndex, v_updateRequest); // Update request 2 v_request:= f_getUpdateRequestPrimitive(int2, v_aeIndex, v_updateRequest); // Update request 2
f_cse_updateResource(v_request); f_cse_updateResource(v_request);
...@@ -16715,7 +16717,7 @@ module OneM2M_Testcases { ...@@ -16715,7 +16717,7 @@ module OneM2M_Testcases {
// Preamble // Preamble
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, omit, omit, omit, omit, omit, int2); //notificationContentType ="modified attributes" v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, omit, omit, omit, omit, omit, int2, omit); //notificationContentType ="modified attributes"
f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23); f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23);
...@@ -16798,7 +16800,7 @@ module OneM2M_Testcases { ...@@ -16798,7 +16800,7 @@ module OneM2M_Testcases {
f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23); f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23);
v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, omit, omit, omit, omit, omit, int3); // notificationContentType ="ResourceID" v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, omit, omit, omit, omit, omit, int3, omit); // notificationContentType ="ResourceID"
v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex);//Subscription v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex);//Subscription
...@@ -16871,7 +16873,7 @@ module OneM2M_Testcases { ...@@ -16871,7 +16873,7 @@ module OneM2M_Testcases {
f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23); f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23);
v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, omit, 3); //expirationCounter set to 3 v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, omit, 3, omit, omit, omit, -, omit); //expirationCounter set to 3
v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex); // Subscription v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex); // Subscription
...@@ -16956,7 +16958,7 @@ module OneM2M_Testcases { ...@@ -16956,7 +16958,7 @@ module OneM2M_Testcases {
f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23); f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23);
v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, omit, 1); //expirationCounter set to 1 v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, omit, 1, omit, omit, omit, -, omit); //expirationCounter set to 1
v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex);// Subscription v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex);// Subscription
...@@ -17034,7 +17036,7 @@ module OneM2M_Testcases { ...@@ -17034,7 +17036,7 @@ module OneM2M_Testcases {
f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23); f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23);
v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, m_eventNotificationCriteria({int1}, v_attributeList)); v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, m_eventNotificationCriteria({int1}, v_attributeList), omit, omit, omit, omit, -, omit);
v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex);//Subscription v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex);//Subscription
...@@ -17110,8 +17112,8 @@ module OneM2M_Testcases { ...@@ -17110,8 +17112,8 @@ module OneM2M_Testcases {
f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23); f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23);
v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)},omit,omit,m_batchNotifyNumber3Duration1(numberOfAggregatedNotification));// TODO fix the duration v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)},omit,omit,m_batchNotify(numberOfAggregatedNotification), omit, omit, -, omit );
v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex);//Subscription v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex);//Subscription
if(v_notifyHandler.running) { if(v_notifyHandler.running) {
...@@ -17176,7 +17178,7 @@ module OneM2M_Testcases { ...@@ -17176,7 +17178,7 @@ module OneM2M_Testcases {
f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23); f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23);
v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)},omit,omit,m_batchNotifyNumber3Duration1(numberOfAggregatedNotification), true);// TODO fix the duration v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)},omit,omit,m_batchNotify(numberOfAggregatedNotification), true, omit, -, omit);
//TODO We Need to check if the IUT send a notification only for the latest update operation //TODO We Need to check if the IUT send a notification only for the latest update operation
// like we match a Notification we have to verify if it is the first (unvalid behavior) or the last (valid behavior) // like we match a Notification we have to verify if it is the first (unvalid behavior) or the last (valid behavior)
...@@ -17246,7 +17248,7 @@ module OneM2M_Testcases { ...@@ -17246,7 +17248,7 @@ module OneM2M_Testcases {
f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23); f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23);
v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, m_eventNotificationCriteria({int1}, v_attributeList)); v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, m_eventNotificationCriteria({int1}, v_attributeList), omit, omit, omit, omit, -, omit);
v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex);//Subscription v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex);//Subscription
...@@ -17321,7 +17323,7 @@ module OneM2M_Testcases { ...@@ -17321,7 +17323,7 @@ module OneM2M_Testcases {
f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23); f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23);
v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, omit, omit, omit, omit,f_getResourceAddress(v_ae2Index)); // SubscriberURI ="ResourceID" v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, omit, omit, omit, omit,f_getResourceAddress(v_ae2Index), -, omit); // SubscriberURI ="ResourceID"
v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex); // Subscription v_resourceIndex := f_cse_createResource(int23, v_createRequest, v_aeIndex); // Subscription
...@@ -17421,7 +17423,7 @@ module OneM2M_Testcases { ...@@ -17421,7 +17423,7 @@ module OneM2M_Testcases {
// Preamble // Preamble
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi); v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, m_eventNotificationCriteria({int2}, -)); v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, m_eventNotificationCriteria({int2}, -), omit, omit, omit, omit, -, omit);
f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23); f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23);
...@@ -17494,7 +17496,7 @@ module OneM2M_Testcases { ...@@ -17494,7 +17496,7 @@ module OneM2M_Testcases {
v_containerResourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex);//Container v_containerResourceIndex := f_cse_createResource(int3, m_createContainerBase, v_aeIndex);//Container
v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, m_eventNotificationCriteria({int4}, -)); v_createRequest := m_createSubscriptionAdvanced(f_getResourceAddress(v_aeIndex), -, {f_getResourceAddress(v_ae2Index)}, m_eventNotificationCriteria({int4}, -), omit, omit, omit, omit, -, omit);
f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23); f_cse_preamble_subscriptionVerification(v_notifyHandler, v_aeIndex, v_ae2Index, v_createRequest, int23);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment