Commit 62811243 authored by Kevin Di Lallo's avatar Kevin Di Lallo
Browse files

Merge branch 'develop' into lts

parents 5390e6b5 ff85b5a7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -677,6 +677,7 @@ repo:
        api:
          meep-app-support: go-apps/meep-app-enablement/api/app-support/swagger.yaml
          meep-service-mgmt: go-apps/meep-app-enablement/api/service-mgmt/swagger.yaml
          meep-app-info: go-apps/meep-app-enablement/api/app-info/swagger.yaml

  #------------------------------
  #  Dependencies
+2 −0
Original line number Diff line number Diff line
@@ -30,12 +30,14 @@ ingress:
      paths:
        - /{{ .SandboxName }}/mec_app_support
        - /{{ .SandboxName }}/mec_service_mgmt
        - /{{ .SandboxName }}/app_info
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/force-ssl-redirect: {{ .HttpsOnly }}
    nginx.ingress.kubernetes.io/configuration-snippet: |
      rewrite ^/{{ .SandboxName }}/mec_app_support(/|$)(.*)$ /mec_app_support/$2 break;
      rewrite ^/{{ .SandboxName }}/mec_service_mgmt(/|$)(.*)$ /mec_service_mgmt/$2 break;
      rewrite ^/{{ .SandboxName }}/app_info(/|$)(.*)$ /app_info/$2 break;
    {{- if .AuthEnabled }}
    nginx.ingress.kubernetes.io/auth-url: https://$http_host/auth/v1/authenticate?svc=meep-app-enablement&sbox={{ .SandboxName }}
    {{- end }}
+27 −0
Original line number Diff line number Diff line
@@ -188,6 +188,13 @@ default:
#         roles:
#           admin: 'allow'
#           user: 'allow'
#       - name: 'GetDistanceGeoDataByName'
#         path: '/geodata/{assetName}/distanceTo'
#         method: 'POST'
#         mode: 'verify'
#         roles:
#           admin: 'allow'
#           user: 'allow'
#       - name: 'GetGeoDataByName'
#         path: '/geodata/{assetName}'
#         method: 'GET'
@@ -195,6 +202,13 @@ default:
#         roles:
#           admin: 'allow'
#           user: 'allow'
#       - name: 'GetWithinRangeByName'
#         path: '/geodata/{assetName}/withinRange'
#         method: 'POST'
#         mode: 'verify'
#         roles:
#           admin: 'allow'
#           user: 'allow'
#       - name: 'UpdateGeoDataByName'
#         path: '/geodata/{assetName}'
#         method: 'POST'
@@ -242,6 +256,19 @@ default:
#         method: 'GET'
#         mode: 'block'
#   #------------------------------
#   #  Application Information (Sbox)
#   #------------------------------
#   - name: 'meep-app-enablement-app-info'
#     path: '/app_info/v1'
#     sbox: true
#     default:
#       mode: 'allow'
#     endpoints:
#       - name: 'Index'
#         path: '/'
#         method: 'GET'
#         mode: 'block'
#   #------------------------------
#   #  Metrics Engine (Sbox)
#   #------------------------------
#   - name: 'meep-metrics-engine'
+16 −0
Original line number Diff line number Diff line
@@ -252,6 +252,22 @@ services:
#       - name: 'Index'
#         path: '/'
#         method: 'GET'
#         mode: 'block'
  #------------------------------
  #  App Information (Sbox)
  #------------------------------
  - name: 'meep-app-enablement-app-info'
    path: '/app_info/v1'
    sbox: true
    default:
      mode: 'verify'
      roles:
        admin: 'allow'
        user: 'allow'
#     endpoints:
#       - name: 'Index'
#         path: '/'
#         method: 'GET'
#         mode: 'block'
  #------------------------------
  #  Metrics Engine (Sbox)
+365 −0
Original line number Diff line number Diff line
openapi: 3.0.2
servers:
  - url: 'https://localhost/sandboxname/app_info/v1'
info:
  title: AdvantEDGE Application Information API
  version: 1.0.0
  description: AdvantEDGE implementation to create an Application Instance information using OpenAPI. Developed as an extension to Application Enablement API.
  license:
    name: Apache 2.0
    url: 'https://github.com/InterDigitalInc/AdvantEDGE/blob/master/LICENSE'
  contact:
    name: InterDigital AdvantEDGE Support
    email: AdvantEDGE@InterDigital.com
externalDocs:
  description: GitHub Wiki
  url: 'https://github.com/InterDigitalInc/AdvantEDGE/wiki'
tags:
  - name: apps
paths:
  '/applications':
    get:
      description: This method retrieves information about a list of mec application resources.
      operationId: Applications_GET
      tags:
        - apps
      parameters:
        - $ref: '#/components/parameters/Query.App_name'
        - $ref: '#/components/parameters/Query.App_state'
      responses:
        '200':
          $ref: '#/components/responses/Applications.200'
        '400':
          $ref: '#/components/responses/Error.400'
        '403':
          $ref: '#/components/responses/Error.403'
        '404':
          $ref: '#/components/responses/Error.404'
        '414':
          $ref: '#/components/responses/Error.414'
    post:
      description: This method is used to create a mec application resource.
      operationId: Applications_POST
      tags:
        - apps
      responses:
        '201':
          $ref: '#/components/responses/Application.201'
        '400':
          $ref: '#/components/responses/Error.400'
        '403':
          $ref: '#/components/responses/Error.403'
        '404':
          $ref: '#/components/responses/Error.404'
      requestBody:
        $ref: '#/components/requestBodies/ApplicationInfo'
  '/applications/{appInstanceId}':
    parameters:
      - $ref: '#/components/parameters/Path.AppInstanceId'
    get:
      description: This method retrieves information about a mec application resource.
      operationId: ApplicationsAppInstanceId_GET
      tags:
        - apps
      responses:
        '200':
          $ref: '#/components/responses/ApplicationAppInstanceId.200'
        '400':
          $ref: '#/components/responses/Error.400'
        '403':
          $ref: '#/components/responses/Error.403'
        '404':
          $ref: '#/components/responses/Error.404'
    put:
      description: This method updates the information about a mec application resource.
      operationId: ApplicationsAppInstanceId_PUT
      tags:
        - apps
      responses:
        '200':
          $ref: '#/components/responses/ApplicationAppInstanceId.200'
        '400':
          $ref: '#/components/responses/Error.400'
        '403':
          $ref: '#/components/responses/Error.403'
        '404':
          $ref: '#/components/responses/Error.404'
        '412':
          $ref: '#/components/responses/Error.412'
      requestBody:
        $ref: '#/components/requestBodies/ApplicationInfo'
    delete:
      description: This method deletes a mec application resource.
      operationId: ApplicationsAppInstanceId_DELETE
      tags:
        - apps
      responses:
        '204':
          description: No Content
        '403':
          $ref: '#/components/responses/Error.403'
        '404':
          $ref: '#/components/responses/Error.404'
components:
  schemas:
    Empty:
      description: Empty schema
    ProblemDetails:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/Problem.type'
        title:
          $ref: '#/components/schemas/Problem.title'
        status:
          $ref: '#/components/schemas/Problem.status'
        detail:
          $ref: '#/components/schemas/Problem.detail'
        instance:
          $ref: '#/components/schemas/Problem.instance'
    Problem.detail:
      type: string
      description: A human-readable explanation specific to this occurrence of the problem
    Problem.instance:
      type: string
      format: uri
      description: A URI reference that identifies the specific occurrence of the problem
    Problem.status:
      type: integer
      format: uint32
      description: The HTTP status code for this occurrence of the problem
    Problem.title:
      type: string
      description: 'A short, human-readable summary of the problem type'
    Problem.type:
      type: string
      format: uri
      description: >-
        A URI reference according to IETF RFC 3986 that identifies the problem
        type
    LocalityType:
      description: The scope of locality as expressed by "consumedLocalOnly" and "isLocal". If absent, defaults to MEC_HOST
      type: string
      enum:
        - MEC_SYSTEM
        - MEC_HOST
        - NFVI_POP
        - ZONE
        - ZONE_GROUP
        - NFVI_NODE
      example: 'MEC_SYSTEM'
    ApplicationState:
      description: This enumeration defines the possible states of an application.
      type: string
      enum:
        - ACTIVE
        - INACTIVE
      example: 'ACTIVE'
    ApplicationInfo:
      description: This type represents the general information of a MEC application.
      type: object
      required:
        - appInstanceId
        - state
      properties:
        appInstanceId:
          description: Application Instance Id
          type: string
        appName:
          description: Application Name
          type: string
        version:
          description: Application Version
          type: string
        state:
          $ref: '#/components/schemas/ApplicationState'
  parameters:
    Path.AppInstanceId:
      name: appInstanceId
      description: >-
        Represents a MEC application instance. Note that the
        appInstanceId is allocated by the MEC application manager POST method.
      in: path
      required: true
      schema:
        type: string
    Query.App_name:
      name: app_name
      description: >-
        A MEC application manager may use app_name as an input
        parameter to query the existence of a list of MEC application
        instances with the same name.
      in: query
      required: false
      schema:
        type: string
    Query.App_state:
      name: app_state
      description: >-
        A MEC application manager may use app_state as an input
        parameter to query the state of a list of MEC application
        instances with the same state.
      in: query
      required: false
      schema:
        type: string
  responses:
    Applications.200:
      description: >-
        It is used to indicate nonspecific success. The response body
        contains a representation of the resource.
      content:
        application/json:
          schema:
            type: array
            minItems: 0
            items:
              $ref: '#/components/schemas/ApplicationInfo'
          examples:
            ApplicationInfoList:
              $ref: '#/components/examples/ApplicationInfoList'
    Application.201:
      description: >-
        Upon success, the HTTP response shall include a Location HTTP header
        that contains the resource URI of the created resource.
      headers:
        location:
          description: The resource URI of the created resource
          schema:
            type: string
            format: uri
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApplicationInfo'
          examples:
            ServiceInfo:
              $ref: '#/components/examples/ApplicationInfo'
    ApplicationAppInstanceId.200:
      description: >-
        It is used to indicate nonspecific success. The response body
        contains a representation of the resource.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApplicationInfo'
          examples:
            ServiceInfo:
              $ref: '#/components/examples/ApplicationInfo'
    Error.400:
      description: >-
        Bad Request.
        It is used to indicate that incorrect parameters were passed to the request.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetails'
        text/plain:
          schema:
            $ref: '#/components/schemas/Empty'
    Error.401:
      description: >-
        Unauthorized.
        It is used when the client did not submit the appropriate credentials.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetails'
        text/plain:
          schema:
            $ref: '#/components/schemas/Empty'
    Error.403:
      description: >-
        Forbidden.
        The operation is not allowed given the current status of the resource. 
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetails'
    Error.404:
      description: >-
        Not Found.
        It is used when a client provided a URI that cannot be mapped 
        to a valid resource URI.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetails'
        text/plain:
          schema:
            $ref: '#/components/schemas/Empty'
    Error.409:
      description: >- 
        Conflict.
        The operation cannot be executed currently, due to a conflict with 
        the state of the resource. Typically, this is because the application 
        instance resource is in NOT_INSTANTIATED state.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetails'
        text/plain:
          schema:
            $ref: '#/components/schemas/Empty'
    Error.412:
      description: >-
        Precondition Failed.
        It is used when a condition has failed during conditional requests, 
        e.g. when using ETags to avoid write conflicts.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetails'
        text/plain:
          schema:
            $ref: '#/components/schemas/Empty'
    Error.414:
      description: >-
        It is used to indicate that the server is refusing to process the request because the request URI is longer than the server is willing or able to process.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetails'
        text/plain:
          schema:
            $ref: '#/components/schemas/Empty'
    Error.429:
      description: >-
        Too Many Requests.
        It is used when a rate limiter has triggered.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetails'
        text/plain:
          schema:
            $ref: '#/components/schemas/Empty'
  requestBodies:
    ApplicationInfo:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApplicationInfo'
      description: >-
        New ApplicationInfo with updated "state" is included as entity body of the
        request
      required: true
  examples:
    ApplicationInfo:
      value:
        appInstanceId: 'ApplicationInstance123'
        appName: 'MyAppName'
        version: 'ApplicationVersion1'
        state: 'ACTIVE'
    ApplicationInfoList:
      value:
        - appInstanceId: 'ApplicationInstance123'
          appName: 'MyAppName'
          version: 'ApplicationVersion1'
          state: 'ACTIVE'
        - appInstanceId: 'ApplicationInstance456'
          appName: 'MyAppName'
          version: 'ApplicationVersion2'
          state: 'INACTIVE'

Loading