Commit c1d1ce0c authored by Gergely Csatari's avatar Gergely Csatari Committed by Michele Carignani
Browse files

VNF-Lifecycle-Management-interface

   Todo:
      - Finish review

Change-Id: Ic5eb4f3030f485f39947082c95ac1376d1e81b74
parent 18eb0cf2
Loading
Loading
Loading
Loading
+22 −35
Original line number Diff line number Diff line
@@ -35,6 +35,17 @@ function validate_api () {
  return $vres
}

# usage get_api_from_fn <file_name>
#  e.g. get_api_from_fn /path/to/SOL003/Api1/Api1.yaml returns Api1
function get_api_from_fn () {
  echo "$(basename $(dirname $1))"
}

# usage get_api_from_fn <file_name>
#  e.g. get_api_from_fn /path/to/SOL003/Api1/Api1.yaml returns Api1
function get_deliverable_from_fn () {
  echo "$(basename $(dirname $(dirname $1 )))"
}

## Main ##

@@ -48,43 +59,19 @@ cd "$wd"
# (single results in OR)
fres=0

for d in */ ; do

    if [ -z "$d" -o "$d" = "*/" ]; then
        continue
    fi
 
    deliverable="${d::-1}"
    echo "#### Checking directory $deliverable ($d)"
    
    cd "$deliverable"
    for dd in */ ; do

        if [ -z "$dd" -o "$dd" = "*/" ]; then
            continue
        fi
        
        api="${dd::-1}"
        echo "########## Checking directory $api ($dd)"
        cd "$dd"
        for file in ./*; do
            file_name="${file:2}"
            #echo "-- $file"
            #echo "-- Checking file $file_name"

            if [ "$file_name" == "$api.yaml" ]; then            
	              validate_api "$file_name" "$api" "$deliverable"
for f in $(find -name "*.yaml") ; do
      echo "Found yaml file: $f"
      file=$(basename "$f")
      api=$(get_api_from_fn $f)
      deliverable=$(get_deliverable_from_fn $f)
      if [ "$file" = "$api.yaml" ]; then
          echo "-- Will validate: $f (api: $api) (deliverable:$deliverable)"         
          validate_api "$f" "$api" "$deliverable"
          res=$?
          fres=$(($fres||$res))
      fi
done
        echo 
        cd ..
     done
     cd ..
done

# Exit code needed for jenkins to know the verdict of the build
echo "-- Final validator returns $fres."
exit $fres
+11 −368
Original line number Diff line number Diff line
@@ -2,10 +2,12 @@ swagger: "2.0"

info:
  version: "2.3.0"
  title: SOL003
  title: SOL003 - VNF Lifecycle Management interface
  license:
    name: "ETSI Forge copyright notice"
    url: https://forge.etsi.org/etsi-forge-copyright-notice.txt
  contact: 
    name: "NFV-SOL WG"

basePath: "/vnflcm/v1"

@@ -104,108 +106,6 @@ paths:
      description: >
        The GET method queries information about multiple VNF instances.
      parameters:
        - name: filter
          description: >
            Attribute-based filtering parameters. The VNFM shall support
            receiving filtering parameters as part of the URI query string.
            The NFVO may supply filtering parameters. All attribute names
            that appear in the VnfInstance and in data types referenced
            from it shall be supported in attribute-based filtering
            parameters.
          in: query
          minimum: 0
          maximum: 1
          type: array
          allowEmptyValue: true
          collectionFormat: multi
          items:
            type: string
            pattern: '[a-zA-Z][.a-zA-Z]*\.(eq|neq|gt|lt|gte|lte|cont|ncont)\?=[0-9](,[0-9])*'
        - name: all_fields
          description: >
            Include all complex attributes in the response. This URI query
            parameter requests that all complex attributes are included in
            the response, including those suppressed by exclude_default. It
            is inverse to the "exclude_default" parameter. The API producer 
            shall support this parameter for certain resources. Details are
            defined in the clauses specifying the actual resources. The VNFM
            shall support this parameter.
          in: query
          minimum: 0
          maximum: 1
          type: boolean
        - name: fields
          description: >
            Complex attributes to be included into the response. This URI
            query parameter requests that only the listed complex
            attributes are included in the response.
            The parameter shall be formatted as a list of attribute names.
            An attribute name shall either be the name of an attribute, or a
            path consisting of the names of multiple attributes with
            parent-child relationship, separated by ".". Attribute names in
            the list shall be separated by comma (","). Valid attribute
            names for a particular GET request are the names of all complex
            attributes in the expected response that have a lower cardinality
            bound of 0 and that are not conditionally mandatory.
            The API producer should support this parameter for certain
            resources. Details are defined in the clauses specifying the
            actual resources.
            The VNFM should support this parameter.
          in: query
          minimum: 0
          maximum: 1
          type: array
          collectionFormat: csv
          items:
            type: string
            pattern: '(([a-zA-Z])?(\.[a-zA-Z])*)?,(([a-zA-Z])?(\.[a-zA-Z])*)*'
        - name: exclude_fields
          description: >
            Complex attributes to be excluded from the response. This URI
            query parameter requests that the listed complex attributes are
            excluded from the response. For the format, eligible attributes
            and support by the API producer, the provisions defined for the
            "fields" parameter shall apply.
            The VNFM should support this parameter.
          in: query
          minimum: 0
          maximum: 1
          type: array
          collectionFormat: csv
          items:
            type: string
            pattern: '(([a-zA-Z])?(\.[a-zA-Z])*)?,(([a-zA-Z])?(\.[a-zA-Z])*)*'
        - name: exclude_default
          description: >
            Indicates to exclude the following complex attributes from the
            response.
            Presence of this URI query parameter requests that a default set
            of complex attributes shall be excluded from the response. The
            default set is defined per resource in the present document. Not
            every resource will necessarily have such a default set. Only
            complex attributes with a lower cardinality bound of zero that are
            not conditionally mandatory can be included in the set.
            The API producer shall support this parameter for certain
            resources. Details are defined in the clauses specifying the
            actual resources. This parameter is a flag, i.e. it has no
            value.
            If a resource supports attribute selectors and none of the
            attribute selector parameters is specified in a GET request, the
            "exclude_default" parameter shall be assumed as the default.
            The VNFM shall support this parameter.
            The following attributes shall be excluded from the VnfInstance
            structure in the response body if this parameter is provided, or
            none of the parameters "all_fields," "fields", "exclude_fields",
            "exclude_default" are provided:
            * vnfConfigurableProperties
            * vimConnectionInfo
            * instantiatedVnfInfo
            * metadata
            * extensions
          in: query
          minimum: 0
          maximum: 1
          type: boolean
        - name: Accept
          description: >
            Content-Types that are acceptable for the response.
@@ -972,109 +872,6 @@ paths:
      description: >
        The client can use this method to query status information about
        multiple VNF lifecycle management operation occurrences.
      parameters:
        - name: filter
          description: >
            Attribute-based filtering parameters. The VNFM shall support
            receiving filtering parameters as part of the URI query string.
            The NFVO may supply filtering parameters. All attribute names
            that appear in the VnfLcmOpOcc and in data types referenced
            from it shall be supported in attribute-based filtering
            parameters.
          in: query
          minimum: 0
          maximum: 1
          type: array
          allowEmptyValue: true
          collectionFormat: multi
          items:
            type: string
            pattern: '[a-zA-Z][.a-zA-Z]*\.(eq|neq|gt|lt|gte|lte|cont|ncont)\?=[0-9](,[0-9])*'
        - name: all_fields
          description: >
            Include all complex attributes in the response. This URI query
            parameter requests that all complex attributes are included in
            the response, including those suppressed by exclude_default. It
            is inverse to the "exclude_default" parameter. The API producer 
            shall support this parameter for certain resources. Details are
            defined in the clauses specifying the actual resources. The VNFM
            shall support this parameter.
          in: query
          minimum: 0
          maximum: 1
          type: boolean
        - name: fields
          description: >
            Complex attributes to be included into the response. This URI
            query parameter requests that only the listed complex
            attributes are included in the response.
            The parameter shall be formatted as a list of attribute names.
            An attribute name shall either be the name of an attribute, or a
            path consisting of the names of multiple attributes with
            parent-child relationship, separated by ".". Attribute names in
            the list shall be separated by comma (","). Valid attribute
            names for a particular GET request are the names of all complex
            attributes in the expected response that have a lower cardinality
            bound of 0 and that are not conditionally mandatory.
            The API producer should support this parameter for certain
            resources. Details are defined in the clauses specifying the
            actual resources.
            The VNFM should support this parameter.
          in: query
          minimum: 0
          maximum: 1
          type: array
          collectionFormat: csv
          items:
            type: string
            pattern: '(([a-zA-Z])?(\.[a-zA-Z])*)?,(([a-zA-Z])?(\.[a-zA-Z])*)*'
        - name: exclude_fields
          description: >
            Complex attributes to be excluded from the response. This URI
            query parameter requests that the listed complex attributes are
            excluded from the response. For the format, eligible attributes
            and support by the API producer, the provisions defined for the
            "fields" parameter shall apply.
            The VNFM should support this parameter.
          in: query
          minimum: 0
          maximum: 1
          type: array
          collectionFormat: csv
          items:
            type: string
            pattern: '(([a-zA-Z])?(\.[a-zA-Z])*)?,(([a-zA-Z])?(\.[a-zA-Z])*)*'
        - name: exclude_default
          description: >
            Indicates to exclude the following complex attributes from the
            response.
            Presence of this URI query parameter requests that a default set
            of complex attributes shall be excluded from the response. The
            default set is defined per resource in the present document. Not
            every resource will necessarily have such a default set. Only
            complex attributes with a lower cardinality bound of zero that are
            not conditionally mandatory can be included in the set.
            The API producer shall support this parameter for certain
            resources. Details are defined in the clauses specifying the
            actual resources. This parameter is a flag, i.e. it has no
            value.
            If a resource supports attribute selectors and none of the
            attribute selector parameters is specified in a GET request, the
            "exclude_default" parameter shall be assumed as the default.
            The VNFM shall support this parameter.
            The following attributes shall be excluded from the VnfLcmOpOcc
            structure in the response body if this parameter is provided, or
            none of the parameters "all_fields," "fields", "exclude_fields",
            "exclude_default" are provided:
            * operationParams
            * error
            * resourceChanges
            * changedInfo
            * changedExtVirtualLinks.
          in: query
          minimum: 0
          maximum: 1
          type: boolean
      responses:
        200:
          description: >
@@ -1213,7 +1010,7 @@ paths:
        403:
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/403"
        404:
          $ref: "responses/VNFLifecycleManagement_resp.yaml#/responses/404-task-not-suported-VNF-LCM"
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/404-task-not-suported-VNF-LCM"
        405:
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/404"
        406:
@@ -1256,7 +1053,7 @@ paths:
        403:
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/403"
        404:
          $ref: "responses/VNFLifecycleManagement_resp.yaml#/responses/404-task-not-suported-VNF-LCM"
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/404-task-not-suported-VNF-LCM"
        405:
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/404"
        406:
@@ -1318,7 +1115,7 @@ paths:
        403:
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/403"
        404:
          $ref: "responses/VNFLifecycleManagement_resp.yaml#/responses/404-task-not-suported-VNF-LCM"
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/404-task-not-suported-VNF-LCM"
        405:
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/404"
        406:
@@ -1362,7 +1159,7 @@ paths:
        403:
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/403"
        404:
          $ref: "responses/VNFLifecycleManagement_resp.yaml#/responses/404-task-not-suported-VNF-LCM"
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/404-task-not-suported-VNF-LCM"
        405:
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/404"
        406:
@@ -1446,7 +1243,7 @@ paths:
        403:
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/403"
        404:
          $ref: "responses/VNFLifecycleManagement_resp.yaml#/responses/404-task-not-suported-VNF-LCM"
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/404-task-not-suported-VNF-LCM"
        405:
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/404"
        406:
@@ -1460,24 +1257,6 @@ paths:
        The GET method queries the list of active subscriptions of the
        functional block that invokes the method. It can be used e.g. for
        resynchronization after error situations.
      parameters:
        - name: filter
          description: >
            Attribute-based filtering parameters. The VNFM shall support
            receiving filtering parameters as part of the URI query string.
            The NFVO may supply filtering parameters. All attribute names
            that appear in the VnfInstance and in data types referenced
            from it shall be supported in attribute-based filtering
            parameters.
          in: query
          minimum: 0
          maximum: 1
          type: array
          allowEmptyValue: true
          collectionFormat: multi
          items:
            type: string
            pattern: '[a-zA-Z][.a-zA-Z]*\.(eq|neq|gt|lt|gte|lte|cont|ncont)\?=[0-9](,[0-9])*'
      responses:
        200:
          description: > 
@@ -1527,7 +1306,7 @@ paths:
        403:
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/403"
        404:
          $ref: "responses/VNFLifecycleManagement_resp.yaml#/responses/404-task-not-suported-VNF-LCM"
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/404-task-not-suported-VNF-LCM"
        405:
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/404"
        406:
@@ -1585,7 +1364,7 @@ paths:
        403:
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/403"
        404:
          $ref: "responses/VNFLifecycleManagement_resp.yaml#/responses/404-task-not-suported-VNF-LCM"
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/404-task-not-suported-VNF-LCM"
        405:
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/404"
        406:
@@ -1618,143 +1397,7 @@ paths:
        403:
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/403"
        404:
          $ref: "responses/VNFLifecycleManagement_resp.yaml#/responses/404-task-not-suported-VNF-LCM"
        405:
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/404"
        406:
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/406"
        500:
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/500"
        503:
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/503"
###############################################################################
# Notification endpoint VnfLcmOperationOccurrenceNotification                 #
###############################################################################
  '/URI-is-provided-by-the-client-when-creating-the-subscription-VnfLcmOperationOccurrenceNotification':
    #SOL003 location: 5.4.20
    post:
      description: >
        The POST method delivers a notification from the server to the client.
      parameters:
        - name: VnfLcmOperationOccurrenceNotification
          description: The VNF creation parameters
          in: body
          required: true
          schema:
            $ref: "../../definitions/SOL002SOL003VNFLifecycleManagement_def.yaml#/definitions/VnfLcmOperationOccurrenceNotification"
      responses:
        204:
          description: > 
            The notification was delivered successfully.
          headers:
            WWW-Authenticate:
              description: >
                Challenge if the corresponding HTTP request has not provided
                authorization, or error details if the corresponding HTTP
                request has provided an invalid authorization token.
              type: string
              maximum: 1
              minimum: 0
        400:
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/400"
        401:
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/401"
        403:
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/403"
        404:
          $ref: "responses/VNFLifecycleManagement_resp.yaml#/responses/404-task-not-suported-VNF-LCM"
        405:
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/404"
        406:
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/406"
        500:
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/500"
        503:
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/503"
###############################################################################
# Notification endpoint VnfIdentifierCreationNotification                     #
###############################################################################
  '/URI-is-provided-by-the-client-when-creating-the-subscription-VnfIdentifierCreationNotification':
    #SOL003 location: 5.4.20
    post:
      description: >
        The POST method delivers a notification from the server to the client.
      parameters:
        - name: VnfIdentifierCreationNotification
          description: >
            A notification about the creation of a VNF identifier and the
            related VNF instance resource.
          in: body
          required: true
          schema:
            $ref: "../../definitions/SOL002SOL003VNFLifecycleManagement_def.yaml#/definitions/VnfIdentifierCreationNotification"
      responses:
        204:
          description: > 
            The notification was delivered successfully.
          headers:
            WWW-Authenticate:
              description: >
                Challenge if the corresponding HTTP request has not provided
                authorization, or error details if the corresponding HTTP
                request has provided an invalid authorization token.
              type: string
              maximum: 1
              minimum: 0
        400:
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/400"
        401:
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/401"
        403:
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/403"
        404:
          $ref: "responses/VNFLifecycleManagement_resp.yaml#/responses/404-task-not-suported-VNF-LCM"
        405:
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/404"
        406:
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/406"
        500:
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/500"
        503:
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/503"
###############################################################################
# Notification endpoint VnfIdentifierDeletionNotification                     #
###############################################################################
  '/URI-is-provided-by-the-client-when-creating-the-subscription-VnfIdentifierDeletionNotification':
    #SOL003 location: 5.4.20
    post:
      description: >
        The POST method delivers a notification from the server to the client.
      parameters:
        - name: VnfIdentifierDeletionNotification
          description: >
            A notification about the deletion of a VNF identifier and the
            related VNF instance resource.
          in: body
          required: true
          schema:
            $ref: "../../definitions/SOL002SOL003VNFLifecycleManagement_def.yaml#/definitions/VnfIdentifierDeletionNotification"
      responses:
        204:
          description: > 
            The notification was delivered successfully.
          headers:
            WWW-Authenticate:
              description: >
                Challenge if the corresponding HTTP request has not provided
                authorization, or error details if the corresponding HTTP
                request has provided an invalid authorization token.
              type: string
              maximum: 1
              minimum: 0
        400:
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/400"
        401:
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/401"
        403:
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/403"
        404:
          $ref: "responses/VNFLifecycleManagement_resp.yaml#/responses/404-task-not-suported-VNF-LCM"
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/404-task-not-suported-VNF-LCM"
        405:
          $ref: "../../responses/SOL002SOL003_resp.yaml#/responses/404"
        406:
+0 −28
Original line number Diff line number Diff line
@@ -26,34 +26,6 @@ responses:
        minimum: 0
    schema:
      $ref: "../definitions/VNFLifecycleManagement_def.yaml#/definitions/VnfInstance"
  404-task-not-suported-VNF-LCM:
    description: >
      If the API producer did not find a current representation for the
      resource addressed by the URI passed in the request, or is not
      willing to disclose that one exists, it shall respond with this
      response code. 
      Specifically in case of this task resource, the reason can also be that
      the task is not supported for the VNF LCM operation occurrence
      represented by the parent resource, and that the task resource
      consequently does not exist.
      The "ProblemDetails" structure may be provided, including in the      "detail" attribute information about the sourceof the problem, e.g. a
      wrong resource URI variable.
    headers:
      Content-Type:
        description: The MIME type of the body of the response.
        type: string
        maximum: 1
        minimum: 1
      WWW-Authenticate:
        description: >
          Challenge if the corresponding HTTP request has not provided
          authorization, or error details if the corresponding HTTP
          request has provided an invalid authorization token.
        type: string
        maximum: 1
        minimum: 0
    schema:
      $ref: "../../../definitions/SOL002SOL003_def.yaml#/definitions/ProblemDetails"
  409-another-lcm-operation-ongoing:
    description: >
      The operation cannot be executed currently, due to a conflict with the
+29 −0

File changed.

Preview size limit exceeded, changes collapsed.

+3 −3

File changed.

Contains only whitespace changes.