Commit 01d93bbd994a5b2191b15f3b593e066475dd417e

Authored by Miguel Angel Reina Ortega
1 parent 05ea4a92

f_CSE_DMR_CRE_BV_015 corrected for Subscription permutations

Signed-off-by: reinaortega <miguelangel.reinaortega@etsi.org>
... ... @@ -7,7 +7,7 @@
7 7 *
8 8 * @author oneM2M
9 9 * @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Functions.ttcn $
10   - * $Id: OneM2M_Functions.ttcn 288 2017-05-19 07:18:08Z reinaortega $
  10 + * $Id: OneM2M_Functions.ttcn 289 2017-05-19 08:44:48Z reinaortega $
11 11 * @desc Module containing functions for oneM2M
12 12 *
13 13 */
... ... @@ -1116,6 +1116,12 @@ module OneM2M_Functions {
1116 1116 if(ispresent(p_request.primitiveContent.any_1[0].Subscription_optional.creator)) {
1117 1117 p_request.primitiveContent.any_1[0].Subscription_optional.creator := f_getCreator(p_parentIndex);
1118 1118 }
  1119 + //accessControlPolicyIds
  1120 + if(ispresent(p_request.primitiveContent.any_1[0].Subscription_optional.accessControlPolicyIDs)) {
  1121 + if(match(valueof(p_request.primitiveContent.any_1[0].Subscription_optional.accessControlPolicyIDs), v_defaultAcpIDs )){
  1122 + p_request.primitiveContent.any_1[0].Subscription_optional.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[vc_acpAuxIndex].resource)};
  1123 + }
  1124 + }
1119 1125 }
1120 1126 if (p_resourceType == int4) {//contentInstance
1121 1127 //creator attribute
... ...
... ... @@ -7,7 +7,7 @@
7 7 *
8 8 * @author oneM2M
9 9 * @version $URL: https://forge.etsi.org/svn/oneM2M/trunk/ttcn/OneM2M_Testcases.ttcn $
10   - * $Id: OneM2M_Testcases.ttcn 288 2017-05-19 07:18:08Z reinaortega $
  10 + * $Id: OneM2M_Testcases.ttcn 289 2017-05-19 08:44:48Z reinaortega $
11 11 * @desc Module containing test cases for oneM2M
12 12 *
13 13 */
... ... @@ -2725,7 +2725,7 @@ module OneM2M_Testcases {
2725 2725  
2726 2726 v_createRequest.primitiveContent.any_1[0].Subscription_optional.accessControlPolicyIDs := {"NotInitialized"};
2727 2727  
2728   - f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute);
  2728 + f_CSE_DMR_CRE_BV_015(int23, v_createRequest, c_optionalAttribute);
2729 2729 }
2730 2730  
2731 2731 testcase TC_CSE_DMR_CRE_BV_015_16() runs on CseTester system CseSystem {
... ... @@ -2735,7 +2735,7 @@ module OneM2M_Testcases {
2735 2735  
2736 2736 v_createRequest.primitiveContent.any_1[0].Subscription_optional.expirationTime := "20301231T012345";
2737 2737  
2738   - f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute);
  2738 + f_CSE_DMR_CRE_BV_015(int23, v_createRequest, c_optionalAttribute);
2739 2739  
2740 2740 }
2741 2741  
... ... @@ -2746,7 +2746,7 @@ module OneM2M_Testcases {
2746 2746  
2747 2747 v_createRequest.primitiveContent.any_1[0].Subscription_optional.labels := {"MyLabel"};
2748 2748  
2749   - f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute);
  2749 + f_CSE_DMR_CRE_BV_015(int23, v_createRequest, c_optionalAttribute);
2750 2750  
2751 2751 }
2752 2752  
... ... @@ -2757,7 +2757,7 @@ module OneM2M_Testcases {
2757 2757  
2758 2758 v_createRequest.primitiveContent.any_1[0].Subscription_optional.eventNotificationCriteria := valueof(m_eventNotificationCriteria({int1}, -));
2759 2759  
2760   - f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute);
  2760 + f_CSE_DMR_CRE_BV_015(int23, v_createRequest, c_optionalAttribute);
2761 2761  
2762 2762 }
2763 2763  
... ... @@ -2768,7 +2768,7 @@ module OneM2M_Testcases {
2768 2768  
2769 2769 v_createRequest.primitiveContent.any_1[0].Subscription_optional.expirationCounter := 1;
2770 2770  
2771   - f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute);
  2771 + f_CSE_DMR_CRE_BV_015(int23, v_createRequest, c_optionalAttribute);
2772 2772  
2773 2773 }
2774 2774  
... ... @@ -2779,7 +2779,7 @@ module OneM2M_Testcases {
2779 2779  
2780 2780 v_createRequest.primitiveContent.any_1[0].Subscription_optional.groupID := "MyGroupID";
2781 2781  
2782   - f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute);
  2782 + f_CSE_DMR_CRE_BV_015(int23, v_createRequest, c_optionalAttribute);
2783 2783  
2784 2784 }
2785 2785  
... ... @@ -2790,7 +2790,7 @@ module OneM2M_Testcases {
2790 2790  
2791 2791 v_createRequest.primitiveContent.any_1[0].Subscription_optional.notificationForwardingURI := "MyForwardingURI";
2792 2792  
2793   - f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute);
  2793 + f_CSE_DMR_CRE_BV_015(int23, v_createRequest, c_optionalAttribute);
2794 2794  
2795 2795 }
2796 2796  
... ... @@ -2801,7 +2801,7 @@ module OneM2M_Testcases {
2801 2801  
2802 2802 v_createRequest.primitiveContent.any_1[0].Subscription_optional.batchNotify := {0, "PT1S"};
2803 2803  
2804   - f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute);
  2804 + f_CSE_DMR_CRE_BV_015(int23, v_createRequest, c_optionalAttribute);
2805 2805  
2806 2806 }
2807 2807  
... ... @@ -2812,7 +2812,7 @@ module OneM2M_Testcases {
2812 2812  
2813 2813 v_createRequest.primitiveContent.any_1[0].Subscription_optional.rateLimit := {0, omit};
2814 2814  
2815   - f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute);
  2815 + f_CSE_DMR_CRE_BV_015(int23, v_createRequest, c_optionalAttribute);
2816 2816  
2817 2817 }
2818 2818  
... ... @@ -2823,7 +2823,7 @@ module OneM2M_Testcases {
2823 2823  
2824 2824 v_createRequest.primitiveContent.any_1[0].Subscription_optional.preSubscriptionNotify := 1;
2825 2825  
2826   - f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute);
  2826 + f_CSE_DMR_CRE_BV_015(int23, v_createRequest, c_optionalAttribute);
2827 2827  
2828 2828 }
2829 2829  
... ... @@ -2834,7 +2834,7 @@ module OneM2M_Testcases {
2834 2834  
2835 2835 v_createRequest.primitiveContent.any_1[0].Subscription_optional.pendingNotification := int1;
2836 2836  
2837   - f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute);
  2837 + f_CSE_DMR_CRE_BV_015(int23, v_createRequest, c_optionalAttribute);
2838 2838 }
2839 2839  
2840 2840 testcase TC_CSE_DMR_CRE_BV_015_26() runs on CseTester system CseSystem {
... ... @@ -2844,7 +2844,7 @@ module OneM2M_Testcases {
2844 2844  
2845 2845 v_createRequest.primitiveContent.any_1[0].Subscription_optional.notificationStoragePriority := 1;
2846 2846  
2847   - f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute);
  2847 + f_CSE_DMR_CRE_BV_015(int23, v_createRequest, c_optionalAttribute);
2848 2848  
2849 2849 }
2850 2850  
... ... @@ -2855,7 +2855,7 @@ module OneM2M_Testcases {
2855 2855  
2856 2856 v_createRequest.primitiveContent.any_1[0].Subscription_optional.latestNotify := true;
2857 2857  
2858   - f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute);
  2858 + f_CSE_DMR_CRE_BV_015(int23, v_createRequest, c_optionalAttribute);
2859 2859  
2860 2860 }
2861 2861  
... ... @@ -2866,7 +2866,7 @@ module OneM2M_Testcases {
2866 2866  
2867 2867 v_createRequest.primitiveContent.any_1[0].Subscription_optional.notificationContentType := int1;
2868 2868  
2869   - f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute);
  2869 + f_CSE_DMR_CRE_BV_015(int23, v_createRequest, c_optionalAttribute);
2870 2870  
2871 2871 }
2872 2872  
... ... @@ -2877,7 +2877,7 @@ module OneM2M_Testcases {
2877 2877  
2878 2878 v_createRequest.primitiveContent.any_1[0].Subscription_optional.notificationEventCat := {alt_1 := 100};
2879 2879  
2880   - f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute);
  2880 + f_CSE_DMR_CRE_BV_015(int23, v_createRequest, c_optionalAttribute);
2881 2881  
2882 2882 }
2883 2883  
... ... @@ -2888,7 +2888,7 @@ module OneM2M_Testcases {
2888 2888  
2889 2889 v_createRequest.primitiveContent.any_1[0].Subscription_optional.creator := "MyCreator";
2890 2890  
2891   - f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute);
  2891 + f_CSE_DMR_CRE_BV_015(int23, v_createRequest, c_optionalAttribute);
2892 2892  
2893 2893 }
2894 2894  
... ... @@ -2899,7 +2899,7 @@ module OneM2M_Testcases {
2899 2899  
2900 2900 v_createRequest.primitiveContent.any_1[0].Subscription_optional.subscriberURI := "MySubscriberURI";
2901 2901  
2902   - f_CSE_DMR_CRE_BV_015(int3, v_createRequest, c_optionalAttribute);
  2902 + f_CSE_DMR_CRE_BV_015(int23, v_createRequest, c_optionalAttribute);
2903 2903  
2904 2904 }
2905 2905  
... ... @@ -2911,6 +2911,8 @@ module OneM2M_Testcases {
2911 2911 var integer v_containerIndex := -1;
2912 2912 var integer v_parentIndex := -1;
2913 2913 var integer v_acpAuxIndex := -1;
  2914 + var CseTester v_notifyHandler;
  2915 + var integer v_ae2Index := -1;
2914 2916 const XSD.NCName c_accessControlPolicyIDs := "accessControlPolicyIDs";
2915 2917  
2916 2918 // Test control
... ... @@ -2933,6 +2935,9 @@ module OneM2M_Testcases {
2933 2935  
2934 2936 v_parentIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
2935 2937  
  2938 + f_cse_preamble_subscriptionVerification(v_notifyHandler, v_parentIndex, v_ae2Index, p_requestPrimitive, p_resourceType);
  2939 +
  2940 +
2936 2941 if(p_resourceType == int4) {
2937 2942 v_containerIndex := f_cse_createResource(int3, m_createContainerBase, v_parentIndex);
2938 2943 v_parentIndex := v_containerIndex;
... ...