Uploaded image for project: 'Optimization Framework'
  1. Optimization Framework
  2. OPTFRA-511

local variable 'triage_data_trans' referenced before assignment - HAS Error

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • Istanbul Release
    • Dublin Release
    • HAS
    • None

      Upon homing with the following request we get a local variable referenced before assignment in HAS:
      2019-05-28T18:51:15.340Z|940dbc6c-4719-45c7-85da-ef1176ad0b4a| org.onap.so.bpmn.common.scripts.OofHoming - OOF Request is: {
      "requestInfo":

      { "transactionId": "940dbc6c-4719-45c7-85da-ef1176ad0b4a", "requestId": "940dbc6c-4719-45c7-85da-ef1176ad0b4a", "callbackUrl": "http://so-bpmn-infra.onap:8081/mso/WorkflowMessage/oofResponse/940dbc6c-4719-45c7-85da-ef1176ad0b4a", "sourceId": "so", "requestType": "create", "numSolutions": 1, "optimizers": ["placement"], "timeout": 600 }

      ,
      "placementInfo": {
      "requestParameters":

      { "customerLatitude": "32.897480", "customerLongitude": "97.040443", "customerName": "some_company" }

      , "subscriberInfo":

      { "globalSubscriberId": "", "subscriberName": "", "subscriberCommonSiteId": "" }

      ,
      "placementDemands": [
      {
      "resourceModuleName": "HpaVf0",
      "serviceResourceId": "ceb8e5df-b8f0-4313-b848-72858def9d6c",
      "tenantId": "null",
      "resourceModelInfo":

      { "modelInvariantId": "af2b6dd5-f5bc-4ef7-8177-6de0b15084d1", "modelVersionId": "ce020d24-6b7f-49ff-b68f-2f9d4ff0a29b", "modelName": "hpa-vf-0", "modelType": "", "modelVersion": "1.0", "modelCustomizationName": "" }

      }
      ]
      },
      "serviceInfo": {
      "serviceInstanceId": "4a288e74-f053-43c0-973b-241eca0e0d81",
      "serviceName": "vFW",
      "modelInfo":

      { "modelType": "", "modelInvariantId": "1ba03449-4da4-438c-a9d7-84f06f503b16", "modelVersionId": "5e00e461-b1a7-460a-a6ce-2f673913ec70", "modelName": "vfw-hpa", "modelVersion": "1.0", "modelCustomizationName": "" }

      }
      }
      2019-05-28T18:51:15.342Z|940dbc6c-4719-45c7-85da-ef1176ad0b4a| org.onap.so.bpmn.common.scripts.OofHoming - Posting to OOF Url: https://oof.api.simpledemo.onap.org:8698/api/oof/v1/placement
      2019-05-28T18:51:15.348Z|940dbc6c-4719-45c7-85da-ef1176ad0b4a| o.o.so.logging.jaxrs.filter.PayloadLoggingFilter - Making POST request to: https://oof.api.simpledemo.onap.org:8698/api/oof/v1/placement

       

       

      2019-05-28T18:51:31.350Z|ad467742-f342-499a-994b-cc5e83b9f6ab| org.onap.so.bpmn.common.scripts.OofHoming - OOF Async Callback Response is: "{\"externalApplicationDetails\": {\"responseMessage\": {\"plans\": [{\"name\": \"940dbc6c-4719-45c7-85da-ef1176ad0b4a\", \"links\": [[

      {\"rel\": \"self\", \"href\": \"https:// oof-has-api:8091/v1/plans/c9a2e436-a7e4-4a89-8029-626d7afca1eb\"}

      ]], \"message\": \"local variable 'triage_data_trans' referenced before assignment\", \"status\": \"error\", \"id\": \"c9a2e436-a7e4-4a89-8029-626d7afca1eb\"}]}, \"httpStatusCode\": 200, \"url\": \"https://oof-has-api:8091/v1/plans/c9a2e436-a7e4-4a8 9-8029-626d7afca1eb\", \"httpMethod\": \"GET\"}, \"serviceException\": {\"text\": \"A request exception has occurred when contacting an external system\", \"errorType\": \"InterfaceError\"}}"

       

      I assume there is some data missing and that is why this error comes from HAS. However we should not get a 'local variable 'triage_data_trans' referenced before assignment'.  Error description and handling of the variable should be improved so that unassigned variables are not referenced and a helpful error is returned to OSDF.

      https://gerrit.onap.org/r/gitweb?p=optf%2Fhas.git&a=search&h=refs%2Fheads%2Fmaster&st=grep&s=triage_data_trans

            krishnaa96 krishnaa96
            mgkwill mgkwill
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: