Uploaded image for project: 'Service Orchestrator'
  1. Service Orchestrator
  2. SO-3423

cloudConfiguration parameter parsing during Macro Instantiation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • Kohn Release
    • Guilin Release
    • ONAP instance build from master

      Our team is going to instantiate a service that consists of one VNF with macro instantiation. This VNF is composed of two vfModules - the first of them should be instantiated on k8s cluster and the second one on OpenStack. This specific composition of service requires the possibility to pass cloudConfiguration for each vfModule separately. At first sight, macro instantiation supports it. cloudConfiuration could be defined at the service level, VNF level, and vfModule level in instantiation request.

      When cloudConfguration is passed only at vfModule level, the request fails with the message:

      {
          "requestError": {
              "serviceException": {
                  "messageId": "SVC0002",
                  "text": "Error parsing request: No valid cloudConfiguration in userParams vnf resources is specified"
              }
          }
      }
      

      When cloudConfiguration is passed at VNF level it is used for both vfModules.
      Request could be find in attachments - request_cloudconfig_vnf_and_vfmodule.json
      This piece of code is responsible for this bug:

      protected CloudRegion getCloudRegionFromMacroRequest(CloudConfiguration cloudConfiguration, Resources resources) {
              if (cloudConfiguration == null) {
                  for (Vnfs vnfs : resources.getVnfs()) {
                      if (cloudConfiguration == null) {
                          cloudConfiguration = vnfs.getCloudConfiguration();
                      } else {
                          break;
                      }
                      for (VfModules vfModules : vnfs.getVfModules()) {
                          if (cloudConfiguration == null) {
                              cloudConfiguration = vfModules.getCloudConfiguration();
                          } else {
                              break;
                          }
                      }
                  }
                  for (Networks networks : resources.getNetworks()) {
                      if (cloudConfiguration == null) {
                          cloudConfiguration = networks.getCloudConfiguration();
                      } else {
                          break;
                      }
                  }
              }
      

      If cloudConfiguration is defined at VNF level cloudConfiguration at vfModule level is ignored. As a consequence of the break statement, each VNF (and vfModule) are trying to be instantiated in the same cloud.

      It should be possible to define cloud configuration only at vfModule level. Moreover, it should be possible to instantiate each vfModule that VNF is composed of a different cloud.

      When we look at getCloudRegionFromMacroRequest(), when someone has 2 VNFs and wants to create them on two different regions always the one specified for one of VNFs will be chosen. The same applies to vfModules. For A'la carte instantiation, due to the fact we instantiate separately VNF and each vfModule this problem is not visible. We identify it as a bug due to the fact the cloudConfiguratino parameters available in the Service instantiation request are not interpreted properly.

       

            rajewluk Lukasz Rajewski
            chabimic chabimic
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: