Commit e39b8de8 authored by Yann Garcia's avatar Yann Garcia
Browse files

Implement QoS Events Sub/Not TPs

parent 742e80a3
Loading
Loading
Loading
Loading
+59 −27
Original line number Diff line number Diff line
@@ -73,59 +73,91 @@ system.httpPort_notif.params := "HTTP(codecs=json:json_codec_mec030)/TCP(debug=1
#AtsMec_QoSMeasurementAPI_TestControl.control

# Check that the IUT responds with the list of QoS measurement subscriptions when queried by a MEC Application
AtsMec_QoSMeasurementAPI_TestControl.testcase TC_MEC_MEC045_SRV_QOSLOOKUP_001_OK
AtsMec_QoSMeasurementAPI_TestControl.testcase.TC_MEC_MEC045_SRV_QOSLOOKUP_001_OK
# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
#AtsMec_QoSMeasurementAPI_TestControl.testcase TC_MEC_MEC045_SRV_QOSLOOKUP_001_BR
#AtsMec_QoSMeasurementAPI_TestControl.testcase.TC_MEC_MEC045_SRV_QOSLOOKUP_001_BR
# Check that the IUT responds with an error when no subscription are created
#AtsMec_QoSMeasurementAPI_TestControl.testcase TC_MEC_MEC045_SRV_QOSLOOKUP_001_NF
#AtsMec_QoSMeasurementAPI_TestControl.testcase.TC_MEC_MEC045_SRV_QOSLOOKUP_001_NF
# Check that the IUT responds with the list of QoS measurement subscriptions when queried by a MEC Application - Filter on subscriptionId
#AtsMec_QoSMeasurementAPI_TestControl.testcase TC_MEC_MEC045_SRV_QOSLOOKUP_002_OK_01
#AtsMec_QoSMeasurementAPI_TestControl.testcase.TC_MEC_MEC045_SRV_QOSLOOKUP_002_OK_01
# Check that the IUT responds with the list of QoS measurement subscriptions when queried by a MEC Application - Filter on subscriptionType
#AtsMec_QoSMeasurementAPI_TestControl.testcase TC_MEC_MEC045_SRV_QOSLOOKUP_002_OK_02
#AtsMec_QoSMeasurementAPI_TestControl.testcase.TC_MEC_MEC045_SRV_QOSLOOKUP_002_OK_02
# Check that the IUT responds with with an error when no subscription matches with the filter - Filter on subscriptionType
#AtsMec_QoSMeasurementAPI_TestControl.testcase TC_MEC_MEC045_SRV_QOSLOOKUP_002_NF_01
#AtsMec_QoSMeasurementAPI_TestControl.testcase.TC_MEC_MEC045_SRV_QOSLOOKUP_002_NF_01
# Check that the IUT responds with with an error when no subscription matches with the filter - Filter on subscriptionId
#AtsMec_QoSMeasurementAPI_TestControl.testcase TC_MEC_MEC045_SRV_QOSLOOKUP_002_NF_02
#AtsMec_QoSMeasurementAPI_TestControl.testcase.TC_MEC_MEC045_SRV_QOSLOOKUP_002_NF_02
# Check that the IUT responds with a QoS measurement subscription when queried by a MEC Application
#AtsMec_QoSMeasurementAPI_TestControl.testcase TC_MEC_MEC045_SRV_QOSLOOKUP_003_OK
#AtsMec_QoSMeasurementAPI_TestControl.testcase.TC_MEC_MEC045_SRV_QOSLOOKUP_003_OK
# Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application
#AtsMec_QoSMeasurementAPI_TestControl.testcase TC_MEC_MEC045_SRV_QOSLOOKUP_003_NF
#AtsMec_QoSMeasurementAPI_TestControl.testcase.TC_MEC_MEC045_SRV_QOSLOOKUP_003_NF
# Check that the IUT responds with a QoS measurement subscription when queried by a MEC Application
#AtsMec_QoSMeasurementAPI_TestControl.testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_OK_01
#AtsMec_QoSMeasurementAPI_TestControl.testcase.TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_OK_01
# Check that the IUT acknowledges the creation of QoS measurement subscription request when commanded by a MEC Application - with reportingInterval
#AtsMec_QoSMeasurementAPI_TestControl.testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_OK_02
#AtsMec_QoSMeasurementAPI_TestControl.testcase.TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_OK_02
# Check that the IUT acknowledges the creation of QoS measurement subscription request when commanded by a MEC Application - with numberOfReports
#AtsMec_QoSMeasurementAPI_TestControl.testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_OK_03
#AtsMec_QoSMeasurementAPI_TestControl.testcase.TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_OK_03
# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Invalid subscriptionType
#AtsMec_QoSMeasurementAPI_TestControl.testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_01
#AtsMec_QoSMeasurementAPI_TestControl.testcase.TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_01
# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Neither callbackReference nor websockNotifConfig provided
#AtsMec_QoSMeasurementAPI_TestControl.testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_02
#AtsMec_QoSMeasurementAPI_TestControl.testcase.TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_02
# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Both callbackReference and websockNotifConfig provided
#AtsMec_QoSMeasurementAPI_TestControl.testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_03
#AtsMec_QoSMeasurementAPI_TestControl.testcase.TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_03
# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - users not present (Note 2)
#AtsMec_QoSMeasurementAPI_TestControl.testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_04
#AtsMec_QoSMeasurementAPI_TestControl.testcase.TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_04
# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - flowInfo not present (Note 2)
#AtsMec_QoSMeasurementAPI_TestControl.testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_05
#AtsMec_QoSMeasurementAPI_TestControl.testcase.TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_05
# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Invalid flowFilter
#AtsMec_QoSMeasurementAPI_TestControl.testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_06
#AtsMec_QoSMeasurementAPI_TestControl.testcase.TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_06
# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Invalid condition on reportingInterval/measuringPeriod
#AtsMec_QoSMeasurementAPI_TestControl.testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_07
#AtsMec_QoSMeasurementAPI_TestControl.testcase.TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_07
# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Invalid condition on measuringArea
#AtsMec_QoSMeasurementAPI_TestControl.testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_08
#AtsMec_QoSMeasurementAPI_TestControl.testcase.TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_001_BR_08
# Check that the IUT acknowledges the changes of an existing QoS measurement subscription request when commanded by a MEC Application
#AtsMec_QoSMeasurementAPI_TestControl.testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_002_OK
#AtsMec_QoSMeasurementAPI_TestControl.testcase.TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_002_OK
# Check that the IUT acknowledges an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application
#AtsMec_QoSMeasurementAPI_TestControl.testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_002_NF
#AtsMec_QoSMeasurementAPI_TestControl.testcase.TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_002_NF
# Check that the IUT acknowledges the cancellation of QoS measurement subscription when commanded by a MEC Application
#AtsMec_QoSMeasurementAPI_TestControl.testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_003_OK
#AtsMec_QoSMeasurementAPI_TestControl.testcase.TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_003_OK
# Check that the IUT responds with an error when a request for an URI that cannot be mapped to a valid resource URI is sent by a MEC Application
#AtsMec_QoSMeasurementAPI_TestControl.testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_003_NF
#AtsMec_QoSMeasurementAPI_TestControl.testcase.TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_003_NF
# Check that the IUT provides a test notification when requested by a MEC Application
#AtsMec_QoSMeasurementAPI_TestControl.testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_004_OK_01
#AtsMec_QoSMeasurementAPI_TestControl.testcase.TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_004_OK_01
# Check that the IUT provides a test notification when requested by a MEC Application
#AtsMec_QoSMeasurementAPI_TestControl.testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_004_OK_02
#AtsMec_QoSMeasurementAPI_TestControl.testcase.TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_004_OK_02
# Check that the IUT terminates notifications when the expiry timer expires
#AtsMec_QoSMeasurementAPI_TestControl.testcase TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_005_OK
#AtsMec_QoSMeasurementAPI_TestControl.testcase.TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_005_OK
# Check that the IUT acknowledges the creation of QoS event subscription request when commanded by a MEC Application
#AtsMec_QoSMeasurementAPI_TestControl.testcase.TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_OK_01
# Check that the IUT acknowledges the creation of QoS event subscription request when commanded by a MEC Application - With thresholds
#AtsMec_QoSMeasurementAPI_TestControl.testcase.TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_OK_02
# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Invalid SubscritionType
#AtsMec_QoSMeasurementAPI_TestControl.testcase.TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_OK_01
# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Neither callbackReference nor websockNotifConfig provided
#AtsMec_QoSMeasurementAPI_TestControl.TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_BR_02
# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Both callbackReference and websockNotifConfig provided
#AtsMec_QoSMeasurementAPI_TestControl.TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_BR_03
# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - users not present (Note 2)
#AtsMec_QoSMeasurementAPI_TestControl.TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_BR_04
# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - flowFilter not present (Note 2)
#AtsMec_QoSMeasurementAPI_TestControl.TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_BR_05
# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Invalid flowFilter
#AtsMec_QoSMeasurementAPI_TestControl.TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_BR_06
# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application - Invalid condition on monitoringArea
#AtsMec_QoSMeasurementAPI_TestControl.TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_BR_07
# Check that the IUT acknowledges the creation of QoS event subscription request when commanded by a MEC Application
#AtsMec_QoSMeasurementAPI_TestControl.TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_002_OK
# Check that the IUT acknowledges the creation of QoS event subscription request when commanded by a MEC Application
#AtsMec_QoSMeasurementAPI_TestControl.TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_002_NF
# Check that the IUT acknowledges the cancellation of QoS event subscription when commanded by a MEC Application
#AtsMec_QoSMeasurementAPI_TestControl.TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_003_OK
# Check that the IUT acknowledges the cancellation of QoS event subscription when commanded by a MEC Application
#AtsMec_QoSMeasurementAPI_TestControl.TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_003_NF
# Check that the IUT provides a test notification when requested by a MEC Application
#AtsMec_QoSMeasurementAPI_TestControl.testcase.TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_004_OK_01
# Check that the IUT provides a test notification when requested by a MEC Application
#AtsMec_QoSMeasurementAPI_TestControl.testcase.TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_004_OK_02
# Check that the IUT terminates notifications when the expiry timer expires
#AtsMec_QoSMeasurementAPI_TestControl.testcase.TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_005_OK

[GROUPS]
# In this section you can specify groups of hosts. These groups can be used inside the
+1194 −19

File changed.

Preview size limit exceeded, changes collapsed.

+23 −1
Original line number Diff line number Diff line
@@ -44,9 +44,31 @@ module AtsMec_QoSMeasurementAPI_TestControl {

      execute(TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_004_OK_01());
      execute(TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_004_OK_02());
    }

      execute(TC_MEC_MEC045_SRV_QOS_MEAS_SUB_NOT_005_OK());

      execute(TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_OK_01());
      execute(TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_OK_02());
      execute(TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_OK_01());
      execute(TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_BR_02());
      execute(TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_BR_03());
      execute(TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_BR_04());
      execute(TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_BR_05());
      execute(TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_BR_06());
      execute(TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_001_BR_07());

      execute(TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_002_OK());
      execute(TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_002_NF());

      execute(TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_003_OK());
      execute(TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_003_NF());

      execute(TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_004_OK_01());
      execute(TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_004_OK_02());

      execute(TC_MEC_MEC045_SRV_QOS_EVENT_SUB_NOT_005_OK());
    }

  }

} // End of module AtsMec_QoSMeasurementAPI_TestControl
 No newline at end of file
+75 −4
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@ module QoSMeasurementAPI_Functions {
  import from LibMec_Pics all;
  import from LibMec_Pixits all;


  function f_create_qos_measure_subscription(
                                             out QoSMeasureSubscription p_qos_measure_subscription,
                                             out charstring p_subscription_id,
@@ -100,7 +99,79 @@ module QoSMeasurementAPI_Functions {
    
  } // End of function f_create_qos_measure_subscription

  function f_delete_qos_measure_subscription(
  function f_create_qos_event_subscription(
                                           out QoSEventSubscription p_qos_event_subscription,
                                           out charstring p_subscription_id,
                                           in template (omit) boolean p_test_notification := omit,
                                           in template (omit) TimeStamp p_expiryDeadline := omit
                                           ) runs on HttpComponent {
    var Headers v_headers;
    var HttpMessage v_response;
    
    f_init_default_headers_list(-, -, v_headers);
    httpPort.send(
                  m_http_request(
                                 m_http_request_post(
                                                     PICS_ROOT_API & PX_QOS_API_LIST_SUBS,
                                                     v_headers,
                                                     m_http_message_body_json(
                                                                              m_body_json_qos_event_subscription(
                                                                                                                 m_qos_event_subscription(
                                                                                                                                          PX_QOS_EVENT_SUB_CALLBACK_URI,
                                                                                                                                          PX_MEASURING_PERIOD,
                                                                                                                                          -,
                                                                                                                                          { PX_USER },
                                                                                                                                          {
                                                                                                                                            m_flow_filter(
                                                                                                                                                          PX_SOURCE_IP,
                                                                                                                                                        {PX_SOURCE_PORT}
                                                                                                                                                        )
                                                                                                                                          },
                                                                                                                                          { 
                                                                                                                                            m_report_trigger(
                                                                                                                                                             JITTER
                                                                                                                                                             )
                                                                                                                                          },
                                                                                                                                          -, -, -,
                                                                                                                                          p_test_notification,
                                                                                                                                          -,
                                                                                                                                          p_expiryDeadline
                  ))))));
    tc_ac.start;
    alt {
      [] httpPort.receive(
                          mw_http_response(
                                           mw_http_response_201_created(
                                                                        mw_http_message_body_json(
                                                                                                  mw_body_json_qos_event_subscription(
                                                                                                                                      mw_qos_event_subscription(
                                                                                                                                                                PX_QOS_EVENT_SUB_CALLBACK_URI,
                                                                                                                                                                PX_MEASURING_PERIOD,
                                                                                                                                                                mw_links
                          )))))) -> value v_response {
        tc_ac.stop;
        
        // Extract HTTP Location header
        var charstring_list v_subscription_id;
        f_get_header(v_response.response.header, "Location", v_subscription_id);
        // Extract HTTP subssription id
        p_subscription_id := regexp(
                                    v_subscription_id[0],
                                    "?+" & PX_QOS_API_LIST_SUBS & "/(?*)",
                                    0
                                    );
        p_qos_event_subscription := v_response.response.body.json_body.qos_event_subscription;
        log("f_create_qos_event_subscription: INFO: IUT successfully responds to the subscription: ", p_qos_event_subscription);
        log("f_create_qos_event_subscription: INFO: p_subscription_id: ", p_subscription_id);
      }
      [] tc_ac.timeout {
        log("f_create_qos_event_subscription: INCONC: Expected message not received");
      }
    } // End of 'alt' statement
    
  } // End of function f_create_qos_event_subscription

  function f_delete_qos_subscription(
                                             in charstring p_subscription_id
                                             ) runs on HttpComponent {
    var Headers v_headers;
@@ -121,10 +192,10 @@ module QoSMeasurementAPI_Functions {
        tc_ac.stop;
      }
      [] tc_ac.timeout {
        log("f_delete_qos_measure_subscription: INCONC: Expected message not received");
        log("f_delete_qos_subscription: INCONC: Expected message not received");
      }
    } // End of 'alt' statement
    
  } // End of function f_delete_qos_measure_subscription
  } // End of function f_delete_qos_subscription

} // End of module QoSMeasurementAPI_Functions
+6 −0
Original line number Diff line number Diff line
@@ -18,6 +18,8 @@ module QoSMeasurementAPI_Pixits {

  modulepar Json.AnyURI PX_QOS_MEAS_SUB_CALLBACK_URI := "http://clientApp.example.com/location_notifications/123456";

  modulepar Json.AnyURI PX_QOS_EVENT_SUB_CALLBACK_URI := "http://clientApp.example.com/location_notifications/123456";

  modulepar Json.String PX_USER := "10.100.0.1";

  modulepar Json.String PX_SOURCE_IP := "10.100.0.20";
@@ -38,4 +40,8 @@ module QoSMeasurementAPI_Pixits {

  modulepar TimeStamp PX_EXPIRY_DEADLINE := { seconds := 30, nanoSeconds := 0 };

  modulepar Json.UInteger PX_JITTER_THRESHOLD_HIGH := 10;

  modulepar Json.UInteger PX_JITTER_THRESHOLD_LOW := 5;

} // End of module QoSMeasurementAPI_Pixits
Loading