Commit 5fa5e9e8 authored by Simon Pastor's avatar Simon Pastor
Browse files

all services supporting mec appTermination

parent 341d8d8e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ To see how to make this your own, look here:
[README](https://github.com/swagger-api/swagger-codegen/blob/master/README.md)

- API version: 2.1.1
- Build date: 2021-07-30T12:04:39.486-04:00[America/New_York]
- Build date: 2021-07-30T17:37:24.731-04:00[America/New_York]


### Running the server
+0 −10
Original line number Diff line number Diff line
@@ -53,8 +53,6 @@ const defaultScopeOfLocality = "MEC_SYSTEM"
const defaultConsumedLocalOnly = true
const appTerminationPath = "notifications/mec011/appTermination"

const sboxCtrlBasepath = "http://meep-sandbox-ctrl/sandbox-ctrl/v1"

const typeZone = "zone"
const typeAccessPoint = "accessPoint"
const typeUser = "user"
@@ -341,14 +339,6 @@ func Init() (err error) {
		if svcMgmtClient == nil {
			return errors.New("Failed to create App Enablement Service Management REST API client")
		}

		// Create Sandbox Ctrl client
		sandboxCtrlClientCfg := scc.NewConfiguration()
		sandboxCtrlClientCfg.BasePath = sboxCtrlBasepath
		sandboxCtrlClient = scc.NewAPIClient(sandboxCtrlClientCfg)
		if sandboxCtrlClient == nil {
			return errors.New("Failed to create Sandbox Ctrl REST API client")
		}
	}

	log.Info("Location Service successfully initialized")
+90 −0
Original line number Diff line number Diff line
@@ -513,6 +513,33 @@ paths:
        '429':
          $ref: '#/components/responses/429'
      x-swagger-router-controller: "subscriptions"
  /notifications/mec011/appTermination:
    post:
      tags:
      - 'rni'
      summary: 'MEC011 Application Termination notification for self termination'
      description: 'Terminates itself.'
      operationId: mec011AppTerminationPOST
      requestBody:
        description: 'Termination notification details'
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AppTerminationNotification'
            example:
                notificationType: 'AppTerminationNotification'
                operationAction: 'TERMINATING'
                maxGracefulTimeout: 10
                links:
                  subscription:
                    href: 'http://mec011Server.example.com/mec_app_support/v1/applications/appId1234/subscriptions/sub123'
                  confirmTermination:
                    href: 'http://mec011Server.example.com/mec_app_support/v1/confirm_termination'
      responses:
        '204':
          description: No Content
      x-swagger-router-controller: 'notifications'
components:
  responses:
    204:
@@ -3606,3 +3633,66 @@ components:
      - 30
      - 31
      type: integer
    AppTerminationNotification.Links:
      description: >-
        Object containing hyperlinks related to the resource.
      type: object
      required:
        - subscription
      properties:
        subscription:
          $ref: '#/components/schemas/LinkType'
        confirmTermination:
          $ref: '#/components/schemas/LinkType.ConfirmTermination'
    AppTerminationNotification.MaxGracefulTimeout:
      description: >-
        Maximum timeout value in seconds for graceful termination or graceful
        stop of an application instance.
      type: integer
      format: uint32
      example: 10
    AppTerminationNotification.NotificationType:
      description: Shall be set to AppTerminationNotification.
      type: string
      example: 'AppTerminationNotification'
    AppTerminationNotification:
      description: >-
        This type represents the information that the MEC platform
        notifies the subscribed application instance about  the corresponding
        application instance termination/stop.
      type: object
      required:
        - notificationType
        - operationAction
        - maxGracefulTimeout
        - _links
      properties:
        notificationType:
          $ref: '#/components/schemas/AppTerminationNotification.NotificationType'
        operationAction:
          $ref: '#/components/schemas/OperationActionType'
        maxGracefulTimeout:
          $ref: '#/components/schemas/AppTerminationNotification.MaxGracefulTimeout'
        _links:
          $ref: '#/components/schemas/AppTerminationNotification.Links'
    LinkType.ConfirmTermination:
      description: >-
        Link to the task resource where to confirm termination in case the
        application is ready to be terminated before expiry of the timeout.
      type: object
      properties:
        href:
          $ref: '#/components/schemas/Href'
    Href:
      description: URI referring to a resource
      type: string
      format: uri
      example: '/mecAppSuptApi/example'
    OperationActionType:
      description: Operation that is being performed on the MEC application instance.
      type: string
      enum:
        - STOPPING
        - TERMINATING
      example: 'TERMINATING'
+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ To see how to make this your own, look here:
[README](https://github.com/swagger-api/swagger-codegen/blob/master/README.md)

- API version: 2.1.1
- Build date: 2021-07-30T10:28:29.950876-04:00[America/Toronto]
- Build date: 2021-07-30T17:37:29.375-04:00[America/New_York]


### Running the server
+4 −0
Original line number Diff line number Diff line
@@ -31,6 +31,10 @@ func Layer2MeasInfoGET(w http.ResponseWriter, r *http.Request) {
	layer2MeasInfoGet(w, r)
}

func Mec011AppTerminationPOST(w http.ResponseWriter, r *http.Request) {
	mec011AppTerminationPost(w, r)
}

func PlmnInfoGET(w http.ResponseWriter, r *http.Request) {
	plmnInfoGet(w, r)
}
Loading