Commit aec9628b authored by YannGarcia's avatar YannGarcia
Browse files

Finalyze MEC028 v2.2.1 TPs implementations

parent f4b7245e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -65,6 +65,7 @@ RUN echo "docker-STF-dev" > /etc/hostname \
      sshpass \
      tcpdump \
      texlive-font-utils \
      texlive-latex-base \
      texlive-latex-extra \
      tshark \
      tzdata \
+4 −0
Original line number Diff line number Diff line
@@ -5,6 +5,10 @@
set -e
set -vx


docker rmi --force e96ecd1d6346 9b5cd0f55eee 21cefa32f592


# Force removing stfubuntu docker image
if [ "$1" == "--force-stfubuntu" ]; then
    if [ -n `docker images -q stfubuntu` ]; then
+614 −6

File changed.

Preview size limit exceeded, changes collapsed.

+84 −0
Original line number Diff line number Diff line
@@ -116,4 +116,88 @@ module WlanInformationAPI_Functions {

  } // End of function f_delete_assoc_sta_subscription

  function f_create_measurement_config(
                                       out MeasurementConfig p_measurement_config
                                       ) 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_ME_WLAN_URI & "/measurements",
                                                     v_headers,
                                                     m_http_message_body_json(
                                                                              m_body_json_wlan_measurement_config(
                                                                                                                  m_measurement_config(
                                                                                                                                       -,
                                                                                                                                       {
                                                                                                                                         m_sta_identity(
                                                                                                                                                        PX_MAC_ID,
                                                                                                                                                        PX_SSID,
                                                                                                                                                        -,
                                                                                                                                                        PX_IP_ADDRESS
                                                                                                                                                        )
                                                                                                                                         },
                                                                                                                                       PX_MEASUREMENT_ID,
                                                                                                                                       m_measurement_info(1000, 10)
                                                                                                                                       ))))));

    tc_ac.start;
    alt {
      [] httpPort.receive(
                          mw_http_response(
                                           mw_http_response_201_created(
                                                                        mw_http_message_body_json(
                                                                                                  mw_body_json_wlan_measurement_config(
                                                                                                                                       mw_measurement_config(
                                                                                                                                                             ?
                                                                                                                                                             )))))) -> value v_response {
        tc_ac.stop;

        p_measurement_config := v_response.response.body.json_body.measurementConfig;
        log("f_create_measurement_config: INFO: IUT successfully responds to the subscription: ", p_measurement_config);
      }
      [] tc_ac.timeout {
        log("f_create_measurement_config: INCONC: Expected message not received");
      }
    } // End of 'alt' statement

  } // End of function "f_create_measurement_config

  function f_delete_measurement_config(
                                       in MeasurementConfig p_measurement_config
                                       ) runs on HttpComponent {
    var Headers v_headers;
    var charstring v_uri := regexp(
                                   oct2char(unichar2oct(p_measurement_config.links.self_.href)),
                                   "?+(" & PX_ME_WLAN_URI & "?*)",
                                   0
                                   );
    log("====> v_uri: ", v_uri);

    f_init_default_headers_list(-, -, v_headers);
    httpPort.send(
                  m_http_request(
                                 m_http_request_delete(
                                                       PICS_ROOT_API & v_uri,
                                                       v_headers
                                                       )));

    tc_ac.start;
    alt {
      [] httpPort.receive(
                          mw_http_response(
                                           mw_http_response_204_no_content
                                           )) {
        tc_ac.stop;
      }
      [] tc_ac.timeout {
        log("f_delete_measurement_config: Expected message not received");
      }
    } // End of 'alt' statement

  } // End of function f_delete_measurement_config

} // End of module WlanInformationAPI_Functions
+2 −0
Original line number Diff line number Diff line
@@ -15,4 +15,6 @@ module WlanInformationAPI_Pixits {

  modulepar JSON.String PX_IP_ADDRESS := "10.10.10.10";

  modulepar JSON.String PX_MEASUREMENT_ID := "1";

} // End of module WlanInformationAPI_Pixits
Loading