Uploaded image for project: 'Service Design and Creation'
  1. Service Design and Creation
  2. SDC-3794

Incorrect substitution type being set in Services/VFs

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • London Release
    • Istanbul Release, Jakarta Release
    • SDC
    • None

      The query to retrieve the generic substitution type is not considering the TOSCA model, so it is taking the latest version of the type provided or the configured type, depending on the situation.
      If the same type exist in other model, it can be taking the other model type. If the type does not exist in the selected model, it can find the type from a different model. Both situations leaves the Service/VF in a invalid state.

      To reproduce:
      Case 1:

      • create a VF in the ETSI SOL001 v2.5.1
      • the substitution type will be the org.openecomp.resource.abstract.nodes.VF, which only exists in the SDC-AID model

      Case 2:

      • create a Service through the API, for the model "ETSI SOL001 v2.5.1" and category "ETSI NFV Network Service":
      curl --location --request POST 'http://localhost:8285/sdc1/feProxy/rest/v1/catalog/services' \
      --header 'Connection: keep-alive' \
      --header 'USER_ID: cs0008' \
      --header 'Content-MD5: ZTAzODY1ODZjNTY2OWZhMGM3OWQwMjNlY2I4OTVlNGE=' \
      --header 'sec-ch-ua-mobile: ?0' \
      --header 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36' \
      --header 'Content-Type: application/json;charset=UTF-8' \
      --header 'Accept: application/json, text/plain, */*' \
      --header 'X-ECOMP-RequestID: b01057fc-5e6c-42e9-b5da-69849490d02f' \
      --header 'sec-ch-ua-platform: "Linux"' \
      --header 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="96", "Google Chrome";v="96"' \
      --header 'Sec-Fetch-Site: same-origin' \
      --header 'Sec-Fetch-Mode: cors' \
      --header 'Sec-Fetch-Dest: empty' \
      --header 'Accept-Language: en,pt-BR;q=0.9,pt;q=0.8,en-US;q=0.7' \
      --data-raw '{
          "categorySpecificMetadata": {
              "ETSI Version": "2.5.1"
          },
          "artifacts": {},
          "toscaArtifacts": {},
          "contactId": "cs0008",
          "categories": [
              {
                  "name": "ETSI NFV Network Service",
                  "normalizedName": "etsi nfv network service",
                  "models": [
                      "ETSI SOL001 v2.5.1",
                      "SDC AID"
                  ],
                  "uniqueId": "serviceNewCategory.etsi nfv network service",
                  "icons": [
                      "etsi_nfv_network_service"
                  ],
                  "useServiceSubstitutionForNestedServices": false,
                  "metadataKeys": [
                      {
                          "name": "ETSI Version",
                          "displayName": "ETSI Version",
                          "validValues": [
                              "3.3.1",
                              "2.7.1",
                              "2.5.1"
                          ],
                          "mandatory": true,
                          "defaultValue": "2.5.1",
                          "version": null,
                          "type": null,
                          "empty": false,
                          "ownerId": null
                      }
                  ],
                  "subcategories": null,
                  "version": null,
                  "type": null,
                  "empty": false,
                  "ownerId": null
              }
          ],
          "description": "awdadw",
          "icon": "defaulticon",
          "componentInstancesProperties": {},
          "componentInstancesAttributes": {},
          "name": "Service10",
          "tags": [
              "Service10"
          ],
          "capabilities": {},
          "requirements": {},
          "deploymentArtifacts": {},
          "componentType": "SERVICE",
          "componentInstances": [],
          "properties": [],
          "attributes": [],
          "model": "ETSI SOL001 v2.5.1",
          "forwardingPaths": {},
          "ecompGeneratedNaming": true,
          "serviceApiArtifacts": {},
          "instantiationType": "A-la-carte",
          "environmentContext": "General_Revenue-Bearing"
      }'
      
      • the Service will pickup a base type from the model "SDC AID" and category "ETSI NFV Network Service", the "tosca.nodes.nfv.NS" version "2.0", instead the one from the model "ETSI SOL001 v2.5.1", the "tosca.nodes.nfv.NS" version "1.0".

            Unassigned Unassigned
            andre.schmid andre.schmid
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: