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

The URL used to get the resources from the catalogDB is using an invalid version: v3

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • Casablanca Maintenance Release
    • None

      The URL used to get the resources from the catalogDB is using an invalid version: v3

      see logs below which result into the failure

      2019-01-16T11:46:33.092Z|b0c3d7e7-0652-45bc-8ee8-c0ad7c79daec| org.onap.so.bpmn.core.json.JsonUtils - getJsonValue(): the raw value is a String Object=c0131c5b-2448-4392-8249-b895e1760b9c
      2019-01-16T11:46:33.106Z|b0c3d7e7-0652-45bc-8ee8-c0ad7c79daec| org.onap.so.bpmn.core.json.JsonUtils - getJsonValue(): the raw value is a String Object=ESYe2eServiceVersion7
      2019-01-16T11:46:33.123Z|b0c3d7e7-0652-45bc-8ee8-c0ad7c79daec| org.onap.so.rest.RESTClient - Executing GET to url: http://so-catalog-db-adapter.onap:8082/ecomp/mso/catalog/v3/serviceResources?serviceModelUuid=c0131c5b-2448-4392-8249-b895e1760b9c
      2019-01-16T11:46:33.282Z|b0c3d7e7-0652-45bc-8ee8-c0ad7c79daec| o.o.so.bpmn.common.resource.ResourceRequestBuilder - not able to retrieve service order.
      2019-01-16T11:46:33.283Z|b0c3d7e7-0652-45bc-8ee8-c0ad7c79daec| o.o.s.b.infrastructure.scripts.DoCreateResources - Get Sequence from csar : []
      2019-01-16T11:46:33.287Z|b0c3d7e7-0652-45bc-8ee8-c0ad7c79daec| o.o.s.b.infrastructure.scripts.DoCreateResources - sequencedResourceList: []
      2019-01-16T11:46:33.329Z|b0c3d7e7-0652-45bc-8ee8-c0ad7c79daec| org.camunda.bpm.engine.context - ENGINE-16006 BPMN Stack Trace:
      ScriptTask_0l4nkqr (activity-execute, ProcessInstance[5ee64f50-1984-11e9-ba8e-026ae5912fc9], pa=MSO Infrastructure Application)

      I ran the URL manually and response is invalid

      curl -H "Authorization: Basic YnBlbDpwYXNzd29yZDEk" http://so-catalog-db-adapter.onap:8082/ecomp/mso/catalog/v3/serviceResources?serviceModelUuid=c0131c5b-2448-4392-8249-b895e1760b9c
      invalid version: v3/

      See in CatalogQuery v3 is mark as invalid

      public abstract class CatalogQuery {
      ......
      public String toJsonString(String version, boolean isArray) {
      switch(version)

      { case "v1": return smartToJSON(); case "v2": return JSON2(isArray, !IS_EMBED); default: return "invalid version: "+ version; }


      }
      .....
      }
      Should it not be v2?

      As a part of the E2E flow (DoCreateE2EServiceInstanceV3), it calls DecomposeService which queries for the service resources using v2 and stores the response into DDS_catalogDbResponse and serviceDecomposition. Why not reuse the DDS_catalogDbResponse rather than running the same query again?

      See attached log

      Line 77: http://so-catalog-db-adapter.onap:8082/ecomp/mso/catalog/v2/serviceResources?serviceModelUuid=c0131c5b-2448-4392-8249-b895e1760b9c
      Line 292: http://so-catalog-db-adapter.onap:8082/ecomp/mso/catalog/v3/serviceResources?serviceModelUuid=c0131c5b-2448-4392-8249-b895e1760b9c

      log snippet of decompose service getting serviceResources using v2

      2019-01-16T09:31:30.437Z|58c176d2-3219-46dc-ab5a-895a9f680439| org.onap.so.rest.RESTClient - Executing GET to url: http://so-catalog-db-adapter.onap:8082/ecomp/mso/catalog/v2/serviceResources?serviceModelUuid=c0131c5b-2448-4392-8249-b895e1760b9c

      ....

      2019-01-16T09:31:30.857Z|58c176d2-3219-46dc-ab5a-895a9f680439| org.onap.so.bpmn.common.scripts.DecomposeService - catalog DB response string: {"serviceResources":{"serviceType":"","workloadContext":"Production","serviceAllottedResources":[],"resourceOrder":"Version7ESYe2eVSP","modelInfo":

      {"modelInvariantUuid":"6b41716c-662a-4b37-b7df-62d9729f6c3f","modelName":"ESYe2eServiceVersion7","modelVersion":"1.0","modelUuid":"c0131c5b-2448-4392-8249-b895e1760b9c"}

      ,"environmentContext":"General_Revenue-Bearing","serviceRole":"","serviceVnfs":[{"toscaNodeType":"org.openecomp.resource.vf.Version7esye2evsp","vfModules":[{"initialCount":1,"vfModuleLabel":"base_ves_med1","modelInfo":

      {"modelInvariantUuid":"d08106a7-9db0-4a1d-8722-10e19c768dde","modelName":"Version7esye2evsp..base_ves_med1..module-0","modelVersion":"1","modelCustomizationUuid":"74606ed2-d052-4754-8ba9-ef2758d40afe","modelUuid":"5a366f2b-d4d2-4a90-9a66-bffc01047386"}

      ,"hasVolumeGroup":false,"isBase":true}],"modelInfo":

      {"modelInvariantUuid":"08d505da-03ab-4496-bf8b-32af5cf53944","modelName":"Version7ESYe2eVSP","modelVersion":"1.0","modelCustomizationUuid":"85fac8ea-0fd4-49b7-bb7f-5703a8f2fe8d","modelInstanceName":"Version7ESYe2eVSP 0","modelUuid":"4a7ef210-b209-4e69-a7e2-422a39922b1a"}

      ,"resourceInput":"

      {\"vf_module_id\":\"AFRMODULEID\",\"nf_naming\":\"true\",\"ves_ip\":\"172.26.10.19\",\"simple_key\":\"afr-key\",\"multi_stage_design\":\"false\",\"node_ip\":\"172.26.10.27\",\"simple_flavor_name\":\"m1.small\",\"availability_zone_max_count\":\"1\",\"public_net_id\":\"nova_floating\",\"simple_image_name\":\"UBUNTU16\",\"simple_netid\":\"onap_vip\",\"vnf_id\":\"VESMED\",\"simple_name_0\":\"SIMPLEUBU\"}

      ","nfRole":null,"nfType":null,"multiStageDesign":"false","nfFunction":null,"nfNamingCode":null}],"serviceNetworks":[]}}

            subhash_singh subhash_singh
            seshukm seshukm
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: