Commit 38258b5c authored by Yann Garcia's avatar Yann Garcia
Browse files

TTF T027: Finalyze review MEC-015

parent 6b2662a4
Loading
Loading
Loading
Loading
+1040 −925

File changed.

Preview size limit exceeded, changes collapsed.

+27 −3
Original line number Diff line number Diff line
@@ -12,10 +12,34 @@ module AtsMec_TrafficManagementAPI_TestControl {
  control {
    
    if (PICS_MEC_PLAT and PICS_BWMANAGEMENT_API_SUPPORTED) {
      execute(TC_MEC_MEC015_SRV_TM_001_OK());
      execute(TC_MEC_MEC015_SRV_TM_001_OK_01());
      execute(TC_MEC_MEC015_SRV_TM_001_OK_02());
      execute(TC_MEC_MEC015_SRV_TM_001_OK_03());
      execute(TC_MEC_MEC015_SRV_TM_001_OK_04());
      execute(TC_MEC_MEC015_SRV_TM_001_BR());
      execute(TC_MEC_MEC015_SRV_TM_001_NF_01());
      execute(TC_MEC_MEC015_SRV_TM_001_NF_02());
      execute(TC_MEC_MEC015_SRV_TM_001_NF_03());

      execute(TC_MEC_MEC015_SRV_TM_002_OK());
      execute(TC_MEC_MEC015_SRV_TM_002_BR());
      execute(TC_MEC_MEC015_SRV_TM_002_NF());
      execute(TC_MEC_MEC015_SRV_TM_002_BR_01());
      execute(TC_MEC_MEC015_SRV_TM_002_BR_02());

      execute(TC_MEC_MEC015_SRV_TM_003_OK());
      execute(TC_MEC_MEC015_SRV_TM_003_NF());

      execute(TC_MEC_MEC015_SRV_TM_004_OK());
      execute(TC_MEC_MEC015_SRV_TM_004_BR_01());
      execute(TC_MEC_MEC015_SRV_TM_004_BR_02());
      execute(TC_MEC_MEC015_SRV_TM_004_NF());

      execute(TC_MEC_MEC015_SRV_TM_005_OK());
      execute(TC_MEC_MEC015_SRV_TM_005_BR_01());
      execute(TC_MEC_MEC015_SRV_TM_005_BR_02());
      execute(TC_MEC_MEC015_SRV_TM_005_NF());

      execute(TC_MEC_MEC015_SRV_TM_006_OK());
      execute(TC_MEC_MEC015_SRV_TM_006_NF());
    }
  } // End of 'control' statement

+10 −8
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ module TrafficManagementAPI_Functions {
    httpPort.send(
                  m_http_request(
                                 m_http_request_post(
                                                     PX_ME_BWM_URI,
                                                     PICS_ROOT_API & PX_ME_BWM_URI,
                                                     v_headers,
                                                     m_http_message_body_json(
                                                                              m_body_json_bw_info(
@@ -60,17 +60,19 @@ module TrafficManagementAPI_Functions {
                                                                                                                       mw_bw_info(
                                                                                                                                  p_app_instance_id
                                                                                                                                  )))))) -> value v_response {
        var charstring_list v_bw_allocation_id;
        var charstring_list v_header_location;
        
        tc_ac.stop;

        log("f_create_bw_allocation_resource: BwInfo resource created: ", v_response);
        f_get_header(valueof(v_response.response.header), "Location", v_bw_allocation_id);
        if (lengthof(v_bw_allocation_id) != 0) {
          p_bw_allocation_id := v_bw_allocation_id[0];
        f_get_header(valueof(v_response.response.header), "Location", v_header_location);
        p_bw_allocation_id := regexp(
                                      v_header_location[0],
                                      "?+" & PX_ME_BWM_URI & "/(?*)",
                                      0
                                      );
        p_bw_info := v_response.response.body.json_body.bwInfo;
      }
      }
      [] tc_ac.timeout {
        log("f_create_bw_allocation_resource: Expected message not received");
      }
@@ -87,7 +89,7 @@ module TrafficManagementAPI_Functions {
    httpPort.send(
                  m_http_request(
                                 m_http_request_delete(
                                                       PX_ME_BWM_URI & "/" & p_bw_allocation_id,
                                                       PICS_ROOT_API & PX_ME_BWM_URI & "/" & p_bw_allocation_id,
                                                       v_headers
                                                       )));
    tc_ac.start;
+15 −2
Original line number Diff line number Diff line
module TrafficManagementAPI_Pixits {
  
  // JSON
  import from Json all;
  
  // LibCommon
  import from LibCommon_BasicTypesAndValues all;

@@ -8,9 +11,19 @@ module TrafficManagementAPI_Pixits {
  // LibMec/LocationAPI
  import from LocationAPI_TypesAndValues all;
  
  modulepar Address PX_APP_INSTANCE_ID := "appInst01";
  modulepar Json.String PX_APP_INSTANCE_ID := "appInst01";
  
  modulepar Json.String PX_APP_ALLOCATION_ID := "appAllocationId01";
  
  modulepar Json.String PX_APP_NAME := "appName01";
  
  modulepar Json.String PX_UNKNOWN_APP_INSTANCE_ID := "appInst99";
  
  modulepar Json.String PX_UNKNOWN_APP_NAME := "appName99";
  
  modulepar Json.String PX_UNKNOWN_APP_ALLOCATION_ID := "appAllocationId99";
  
  modulepar Address PX_UNKNOWN_APP_INSTANCE_ID := "appInst99";
  modulepar Json.String PX_UNKNOWN_BW_ALLOCATION_ID := "bwAllocationId99";
  
  modulepar ResourceURL PX_RESOURCE_URL := "http://example.com/exampleAPI/location/v2/users?address:acr:192.0.0.1";

+4 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ module TrafficManagementAPI_Templates {
                                   in BwRequestType p_requestType,
                                   in FixedAllocation p_fixedAllocation,
                                   in AllocationDirection p_allocationDirection,
                                   in template (omit) Json.String p_appName := omit,
                                   in template (omit) AllocationId p_allocationId := omit,
                                   in template (omit) SessionFilter p_sessionFilter := omit,
                                   in template (omit) FixedBWPriority p_fixedBWPriority := omit
@@ -25,6 +26,7 @@ module TrafficManagementAPI_Templates {
    allocationId        := p_allocationId,
    timeStamp           := omit,
    appInsId            := p_appInsId,
    appName             := p_appName,
    requestType         := p_requestType,
    sessionFilter       := p_sessionFilter,
    fixedBWPriority     := p_fixedBWPriority,
@@ -37,6 +39,7 @@ module TrafficManagementAPI_Templates {
                             template (present) BwRequestType p_requestType := ?,
                             template (present) FixedAllocation p_fixedAllocation := ?,
                             template (present) AllocationDirection p_allocationDirection := ?,
                             template Json.String p_appName := *,
                             template AllocationId p_allocationId := *,
                             template SessionFilter p_sessionFilter := *,
                             template FixedBWPriority p_fixedBWPriority := *
@@ -44,6 +47,7 @@ module TrafficManagementAPI_Templates {
    allocationId        := p_allocationId,
    timeStamp           := *,
    appInsId            := p_appInsId,
    appName             := p_appName,
    requestType         := p_requestType,
    sessionFilter       := p_sessionFilter,
    fixedBWPriority     := p_fixedBWPriority,
Loading