Commit f99eb6c0 authored by YannGarcia's avatar YannGarcia
Browse files

Finalyze MEC011 v2.2.1 TPs implementations

parent c277b039
Loading
Loading
Loading
Loading
+546 −57

File changed.

Preview size limit exceeded, changes collapsed.

+4 −4
Original line number Diff line number Diff line
@@ -1377,7 +1377,7 @@ module AtsMec_WlanInformationAPI_TestCases {
     * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
     * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2
     */
    testcase TC_MEC_MEC028_SRV_WAI_012_BR() runs on HttpComponent system HttpTestAdapter {
    /*testcase TC_MEC_MEC028_SRV_WAI_012_BR() runs on HttpComponent system HttpTestAdapter {
        // Local variables
        var Headers v_headers;
        
@@ -1425,7 +1425,7 @@ module AtsMec_WlanInformationAPI_TestCases {
        
        // Postamble
        f_cf_01_http_down();
    } // End of testcase TC_MEC_MEC028_SRV_WAI_012_BR
        }*/ // End of testcase TC_MEC_MEC028_SRV_WAI_012_BR

    /**
     * @desc Check that the IUT responds with the list of WLAN Access Point
@@ -1634,7 +1634,7 @@ module AtsMec_WlanInformationAPI_TestCases {
     * @see https://forge.etsi.org/rep/mec/gs028-wai-api/blob/master/WlanInformationApi.json
     * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/v2.2.1-dev/Test%20Purposes/MEC028/SRV/WAI/Measurement.tplan2
     */
    testcase TC_MEC_MEC028_SRV_WAI_013_NF() runs on HttpComponent system HttpTestAdapter {
    /*testcase TC_MEC_MEC028_SRV_WAI_013_NF() runs on HttpComponent system HttpTestAdapter {
        // Local variables
        var Headers v_headers;
        
@@ -1694,7 +1694,7 @@ module AtsMec_WlanInformationAPI_TestCases {
        
        // Postamble
        f_cf_01_http_down();
    } // End of testcase TC_MEC_MEC028_SRV_WAI_013_NF
        }*/ // End of testcase TC_MEC_MEC028_SRV_WAI_013_NF

    /**
     * @desc Check that the IUT responds with the specified measurement configuration
+2 −0
Original line number Diff line number Diff line
@@ -57,4 +57,6 @@ module AppEnablementAPI_Pixits {

  modulepar TrafficRule_Id PX_NON_EXISTENT_TRAFFIC_RULE_ID := "trafficRuleId99";

  modulepar charstring PX_LINK_LIV := "link/to/individual/mecServiceLiveness";
  
} // End of module AppEnablementAPI_Pixits 
+55 −19
Original line number Diff line number Diff line
@@ -14,6 +14,22 @@ module AppEnablementAPI_Templates {
  import from AppEnablementAPI_TypesAndValues all;
  import from AppEnablementAPI_Pixits all;

  template (value) TimeStamp m_time_stamp(
                                          in Seconds p_seconds,
                                          in NanoSeconds p_nanoSeconds := 0
                                          ) := {
    seconds     := p_seconds,
    nanoSeconds := p_nanoSeconds
  } // End of template m_time_stamp

    template (present) TimeStamp mw_time_stamp(
                                               template (present) Seconds p_seconds := ?,
                                               template (present) NanoSeconds p_nanoSeconds := ?
                                               ) := {
    seconds     := p_seconds,
    nanoSeconds := p_nanoSeconds
  } // End of template mw_time_stamp

  template (value) SecurityInfo m_security_info(
                                                in GrantTypesList p_grantTypes := { OAUTH2_CLIENT_CREDENTIALS },
                                                in TokenEndpoint p_tokenEndpoint := "/mecSerMgmtApi/security/MyTokenEndPoint"
@@ -51,11 +67,11 @@ module AppEnablementAPI_Templates {
                                             in ServiceInfo_Version p_version := PX_SERVICE_INFO_VERSION,
                                             in ServiceState p_state := PX_SERVICE_INFO_STATE,
                                             in SerializerTypes p_serializer := PX_SERIALIZER,
                                             //in ServiceInfo_Link p_links := PX_LINKS_SERVICE_INFO,
                                             in template (omit) SerInstanceId p_serInstanceId := omit,
                                             in template (omit) TransportId p_transportId := omit,
                                             in template (omit) TransportInfo p_transportInfo := omit,
                                             in template (omit) CategoryRef p_serCategory := omit
                                             in template (omit) CategoryRef p_serCategory := omit,
                                             in template (omit) ServiceInfo_Link p_links := omit
                                             ) := {
    serInstanceId     := p_serInstanceId,
    serName           := p_serName,
@@ -67,21 +83,21 @@ module AppEnablementAPI_Templates {
    serializer        := p_serializer,
    scopeOfLocality   := omit,
    consumedLocalOnly := omit,
    isLocal           := omit/*,
    isLocal           := omit,
    livenessInterval  := omit,
    links             := p_links*/
    links             := p_links
  } // End of template m_service_info

  template ServiceInfo mw_service_info(
  template (present) ServiceInfo mw_service_info(
                                                 template (present) SerName p_serName := ?,
                                       template (present) ServiceInfo_Version p_version := ?,
                                       template (present) ServiceState p_state := ?,
                                       template (present) SerializerTypes p_serializer := ?,
                                       //template (present) ServiceInfo_Link p_links := ?,
                                                 template (present) ServiceInfo_Version p_version := PX_SERVICE_INFO_VERSION,
                                                 template (present) ServiceState p_state := PX_SERVICE_INFO_STATE,
                                                 template (present) SerializerTypes p_serializer := PX_SERIALIZER,
                                                 template SerInstanceId p_serInstanceId := *,
                                                 template TransportId p_transportId := *,
                                                 template TransportInfo p_transportInfo := *,
                                       template CategoryRef p_serCategory := *
                                                 template CategoryRef p_serCategory := *,
                                                 template ServiceInfo_Link p_links := *
                                                 ) := {
    serInstanceId     := p_serInstanceId,
    serName           := p_serName,
@@ -93,9 +109,9 @@ module AppEnablementAPI_Templates {
    serializer        := p_serializer,
    scopeOfLocality   := *,
    consumedLocalOnly := *,
    isLocal           := */*,
    isLocal           := *,
    livenessInterval  := *,
    links             := p_links*/
    links             := p_links
  } // End of template mw_service_info

  template (value) SubscriptionLinkList m_subscription_link_list(
@@ -146,6 +162,26 @@ module AppEnablementAPI_Templates {
    appInstanceId     := p_appInstanceId
  } // End of template mw_app_termination_notif_subscription

  template (value) ServiceLivenessInfo m_service_liveness_info(
                                                               in ServiceState p_state,
                                                               in template (value) TimeStamp p_timeStamp,
                                                               in integer p_interval
                                                               ) := {
    state     := p_state,
    timeStamp := p_timeStamp,
    interval  := p_interval
  } // End of template m_service_liveness_info

  template (present) ServiceLivenessInfo mw_service_liveness_info(
                                                                  template (present) ServiceState p_state := ?,
                                                                  template (present) TimeStamp p_timeStamp := ?,
                                                                  template (present) integer p_interval := ?
                                                                  ) := {
    state     := p_state,
    timeStamp := p_timeStamp,
    interval  := p_interval
  } // End of template mw_service_liveness_info

  template (value) TransportInfo m_transport_info(
                                                  in TransportInfo_Id p_id,
                                                  in TransportInfo_Name p_name,
@@ -293,7 +329,7 @@ module AppEnablementAPI_Templates {
                                              in TrafficRule_FilterType p_filterType := FLOW,
                                              in TrafficRule_Priority p_priority := 1,
                                              in TrafficFilterList p_trafficFilter := {},
                                              in TrafficRule_Action p_action_ := FORWARD_AS_IS,
                                              in TrafficRule_Action p_action_ := FORWARD_ENCAPSULATED,
                                              in TrafficRule_State p_state := ACTIVE
                                              ) := {
    trafficRuleId := p_trafficRuleId,
+81 −35
Original line number Diff line number Diff line
/**
 * @desc The ETSI MEC ISG MEC011 Application Enablement API described using OpenAPI
 * @see http://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/01.01.01_60/gs_mec011v010101p.pdf
 * @see http://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/01.01.01_60/gs_mec011v020201p.pdf
 */
module AppEnablementAPI_TypesAndValues {

@@ -20,17 +20,62 @@ module AppEnablementAPI_TypesAndValues {
   */
  type JSON.String NotificationType;

  /**
   * @desc Operation that is being performed on the MEC
   */
  type enumerated OperationAction {
    STOPPING (0),
    TERMINATING (1)
  }

  /**
   * @desc This type represents the information that the mobile edge platform notifies the subscribed application instance about  the corresponding application instance termination/stop.
   */
  type record AppTerminationNotification {
    NotificationType notificationType,
    OperationAction operationAction,
    MaxGracefulTimeout maxGracefulTimeout,
    Subscription links
  } with {
    variant (links) "name as '_links'";
  }

  /**
   * @desc This type represents the information that the MEC application instance provides to the MEC platform when informing it
that the application has completed its application level related terminate/stop actions, e.g. retention of application state
in the case of stop.
   */
  type record AppTerminationConfirmation {
    OperationAction operationAction
  }

  /**
   * @desc This type represents the information that the MEC application instance indicates to the MEC platform that it is up and
running
   */
  type record AppReadyConfirmation {
    JSON.String indication
  }

  /**
   * @desc Represents possible states of a MEC service instance
   */
  type enumerated ServiceState {
    ACTIVE (0),
    INACTIVE (1),
    SUSPENDED (2)
  }
  type record length(0..infinity) of ServiceState ServiceStateList;

  /**
   * @desc This type represents the liveness information of a MEC service instance
   */
  type record ServiceLivenessInfo {
    ServiceState state,
    TimeStamp timeStamp,
    integer interval
  }

  /**
   * @desc It is used as the filtering criterion for the subscribed events.
   */
@@ -150,6 +195,7 @@ module AppEnablementAPI_TypesAndValues {
    DestinationInterface_MacAddress dstMacAddress optional,
    DestinationInterface_IpAddress dstIpAddress optional
  }
  type record of DestinationInterface DestinationInterfaceList;

  /**
   * @desc FQDN resolved by the DNS rule.
@@ -346,7 +392,8 @@ module AppEnablementAPI_TypesAndValues {
   * @desc This type represents security information related to a transport.
   */
  type record SecurityInfo {
    OAuth2Info oAuth2Info
    OAuth2Info oAuth2Info optional,
    UInt8      extentions optional
  }

  /**
@@ -387,7 +434,7 @@ module AppEnablementAPI_TypesAndValues {
    SerInstanceIdList serInstanceIds optional,
    SerNameList serNames optional,
    CategoryRefList serCategories optional,
    ServiceStateList states,
    ServiceStateList states optional,
    JSON.Bool isLocal optional
  }

@@ -422,16 +469,6 @@ module AppEnablementAPI_TypesAndValues {
  type JSON.String SerName;
  type record length(0..infinity) of SerName SerNameList;

  /**
   * @desc Contains the state.
   */
  type enumerated ServiceState {
    ACTIVE,
    INACTIVE,
    UNKNOWN // Used for invalid behavior tests
  }
  type record length(0..infinity) of ServiceState ServiceStateList;

  /**
   * @desc Link to the "Individual mecServiceLiveness" resource where the MEC platform expects the service instance to send the liveness information.
   */
@@ -463,6 +500,15 @@ module AppEnablementAPI_TypesAndValues {
   * @desc Service version.
   */
  type JSON.String ServiceInfo_Version;
  /**
   * @desc Type of the change
   */
  type enumerated ChangeType {
    ADDED (0),
    REMOVED (1),
    STATE_CHANGED (2),
    ATTRIBUTES_CHANGED (3)
  }

  /**
   * @desc This type represents the general information of a mobile edge service.
@@ -478,11 +524,11 @@ module AppEnablementAPI_TypesAndValues {
    SerializerTypes serializer,
    LocalityType scopeOfLocality optional,
    JSON.Bool consumedLocalOnly optional,
    JSON.Bool isLocal optional/*,
    JSON.Bool isLocal optional,
    UInt32 livenessInterval optional,
    ServiceInfo_Link links
  } with {
      variant (links) "name as '_links'";*/
    variant (links) "name as '_links'";
  }
  type record of ServiceInfo ServiceInfoList;

@@ -627,10 +673,10 @@ module AppEnablementAPI_TypesAndValues {
  type UInt32 TrafficFilter_TC;

  /**
   * @desc Used for token based traffic rule.
   * @desc Used for tag based traffic rule.
   */
  type JSON.String TrafficFilter_Token;
  type record of TrafficFilter_Token TrafficFilter_TokenList;
  type JSON.String TrafficFilter_Tag;
  type record of TrafficFilter_Tag TrafficFilter_TagList;

  /**
   * @desc Used for GTP tunnel based traffic rule.
@@ -648,16 +694,16 @@ module AppEnablementAPI_TypesAndValues {
   * @desc This type represents the traffic filter.
   */
  type record TrafficFilter {
    TrafficFilter_AddressList srcAddress,
    TrafficFilter_AddressList dstAddress,
    TrafficFilter_PortList srcPort,
    TrafficFilter_PortList dstPort,
    TrafficFilter_ProtocolList protocol,
    TrafficFilter_TokenList token,
    TrafficFilter_TunnelAddressList srcTunnelAddress,
    TrafficFilter_TunnelAddressList tgtTunnelAddress,
    TrafficFilter_TunnelPortList srcTunnelPort,
    TrafficFilter_TunnelPortList dstTunnelPort,
    TrafficFilter_AddressList srcAddress optional,
    TrafficFilter_AddressList dstAddress optional,
    TrafficFilter_PortList srcPort optional,
    TrafficFilter_PortList dstPort optional,
    TrafficFilter_ProtocolList protocol optional,
    TrafficFilter_TagList tag optional,
    TrafficFilter_TunnelAddressList srcTunnelAddress optional,
    TrafficFilter_TunnelAddressList tgtTunnelAddress optional,
    TrafficFilter_TunnelPortList srcTunnelPort optional,
    TrafficFilter_TunnelPortList dstTunnelPort optional,
    TrafficFilter_QCI qCI optional,
    TrafficFilter_DSCP dSCP optional,
    TrafficFilter_TC tC optional
@@ -670,10 +716,10 @@ module AppEnablementAPI_TypesAndValues {
  type enumerated TrafficRule_Action {
    DROP,
    FORWARD_DECAPSULATED,
    FORWARD_AS_IS,
    FORWARD_ENCAPSULATED,
    PASSTHROUGH,
    DUPLICATE_DECAPSULATED,
    DUPLICATE_AS_IS
    DUPLICATE_ENCAPSULATED
  }

  /**
@@ -711,7 +757,7 @@ module AppEnablementAPI_TypesAndValues {
    TrafficRule_Priority priority,
    TrafficFilterList trafficFilter,
    TrafficRule_Action action_,
    DestinationInterface dstInterface optional,
    DestinationInterfaceList dstInterface optional,
    TrafficRule_State state
  } with {
    variant (action_) "name as 'action'";
@@ -751,10 +797,10 @@ module AppEnablementAPI_TypesAndValues {
  /**
   * @desc This type represents information about a transport endpoint.
   */
  type union TransportInfo_Endpoint {
    EndPointInfo_UriList uris,
    EndPointInfo_AddressList addresses,
    EndPointInfo_Alternative alternative
  type record TransportInfo_Endpoint {
    EndPointInfo_UriList uris optional,
    EndPointInfo_AddressList addresses optional,
    EndPointInfo_Alternative alternative optional
  }

  /**