Uploaded image for project: 'Common Controller SDK'
  1. Common Controller SDK
  2. CCSDK-1726

golden demo's config-assign fails as it resolves golden-vf-module-type and Python script uses vf-module-type

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Low Low
    • El Alto Release
    • El Alto Release
    • None
    • None

       

      config-assign fails as DescriptionExaple.py Python script is trying to get resolved value for vf-module-type.

      value = self.raRuntimeService.getStringFromResolutionStore("vf-module-type")
      

      but seems templates vfw-interface-mapping.json is trying to resolve

        "name": "golden-vf-module-type",
        "input-param": true,
        "property": {
          "type": "string"
        },
        "dictionary-name": "golden-vf-module-type",
        "dictionary-source": "processor-db",
        "dependencies": [
          "vf-module-number"
        ]
      }
      

      golden-vf-module-type instead?

       

      Is this a bug in golden templates?

       

      Log below:

      2019-09-15 12:21:31,119|||reactor-http-epoll-1||||INFO||||||| processing request id 123456
      2019-09-15 12:21:31,119|||reactor-http-epoll-1||||INFO||||||| cba file name(golden), version(1.0.0) already present(/opt/app/onap/blueprints/deploy/golden/1.0.0)
      2019-09-15 12:21:31,119|||reactor-http-epoll-1||||INFO||||||| blueprint base path /opt/app/onap/blueprints/deploy/golden/1.0.0
      2019-09-15 12:21:31,123|||reactor-http-epoll-1||||INFO||||||| Reading blueprint path(/opt/app/onap/blueprints/deploy/golden/1.0.0) and entry definition file (Definitions/golden-blueprint.json)
      2019-09-15 12:21:31,137|||reactor-http-epoll-1||||INFO||||||| assign workflow config-assign input value ({"resolution-key":"config-assign-onap-me-demo-123","config-assign-properties":{"hostname":"samuli-hosti-for-onap-me","interface-name":"eth0","unit-number":12}})
      2019-09-15 12:21:31,138|||reactor-http-epoll-1||||INFO||||||| Executing workflow(config-assign) NodeTemplate(config-assign), derived from(tosca.nodes.Component)
      2019-09-15 12:21:31,138|||reactor-http-epoll-1||||INFO||||||| executing node template(config-assign) component(component-resource-resolution) interface(ResourceResolutionComponent) operation(process) with timeout(180) sec.
      2019-09-15 12:21:31,140|||reactor-http-epoll-1||||INFO||||||| preparing request id(123456) for workflow(config-assign) step(config-assign)
      2019-09-15 12:21:31,143|||reactor-http-epoll-1||||INFO||||||| resolveNodeTemplateInterfaceOperationInputs for node template (config-assign),interface name (ResourceResolutionComponent), operationName(process)
      2019-09-15 12:21:31,144|||reactor-http-epoll-1||||INFO||||||| input definition for node template (config-assign), values ({resolution-key={"get_input":"resolution-key"}, store-result=true, artifact-prefix-names=["hostname","vfw-interface"]})
      2019-09-15 12:21:31,146|||reactor-http-epoll-1||||INFO||||||| Resolving resource for template artifact(hostname-template) with resource assignment artifact(hostname-mapping)
      2019-09-15 12:21:31,479|||reactor-http-epoll-1||||INFO||||||| Assignments ([[name=hostname, status=null, property=, dictionaryName=hostname, dictionarySource=input]])
      2019-09-15 12:21:31,479|||reactor-http-epoll-1||||INFO||||||| Sorted Sequenced Assignments ([[name=*, status=null, property=, dictionaryName=null, dictionarySource=null], [name=hostname, status=null, property=, dictionaryName=hostname, dictionarySource=input]])
      2019-09-15 12:21:31,480|||reactor-http-epoll-1||||INFO||||||| Batched Sequence : ([[[name=*, status=null, property=, dictionaryName=null, dictionarySource=null]], [[name=hostname, status=null, property=, dictionaryName=hostname, dictionarySource=input]]])
      2019-09-15 12:21:31,483|||reactor-http-epoll-1||||INFO||||||| input source template key (hostname) found from input and value is ("samuli-hosti-for-onap-me")
      2019-09-15 12:21:31,484|||reactor-http-epoll-1||||INFO||||||| Setting Resource Value ("samuli-hosti-for-onap-me") for Resource Name (hostname), definition(hostname) of type (string)
      2019-09-15 12:21:31,689|||reactor-http-epoll-1||||INFO||||||| Resource resolution saved into database successfully : ([name=hostname, status=success, property="samuli-hosti-for-onap-me", dictionaryName=hostname, dictionarySource=input])
      2019-09-15 12:21:31,690|||reactor-http-epoll-1||||INFO||||||| Generating Resource name (hostname), type (string), value ("samuli-hosti-for-onap-me")
      2019-09-15 12:21:31,691|||reactor-http-epoll-1||||INFO||||||| Generated Resource Param Data ({
        "hostname" : "samuli-hosti-for-onap-me"
      })
      2019-09-15 12:21:31,741|||DefaultDispatcher-worker-4||||INFO||||||| Writing out template_resolution result: bpName: golden bpVer 1.0.0 resKey:config-assign-onap-me-demo-123 (resourceId:  resourceType: ) occurrence:1
      2019-09-15 12:21:31,792|||reactor-http-epoll-1||||INFO||||||| Template resolution saved into database successfully : ({store-result=true, resolution-key=config-assign-onap-me-demo-123, resource-id=, resource-type=, occurrence=1})
      2019-09-15 12:21:31,793|||reactor-http-epoll-1||||INFO||||||| Resolving resource for template artifact(vfw-interface-template) with resource assignment artifact(vfw-interface-mapping)
      2019-09-15 12:21:31,883|||reactor-http-epoll-1||||INFO||||||| Assignments ([[name=interface-description, status=null, property=, dictionaryName=interface-description, dictionarySource=capability], [name=interface-name, status=null, property=, dictionaryName=interface-name, dictionarySource=input], [name=unit-number, status=null, property=, dictionaryName=unit-number, dictionarySource=input], [name=prefix-id, status=null, property=, dictionaryName=prefix-id, dictionarySource=default], [name=golden-vf-module-type, status=null, property=, dictionaryName=golden-vf-module-type, dictionarySource=processor-db], [name=vf-module-number, status=null, property=, dictionaryName=vf-module-number, dictionarySource=default], [name=vfw_interface_ip, status=null, property=, dictionaryName=create_netbox_ip, dictionarySource=sdnc]])
      2019-09-15 12:21:31,883|||reactor-http-epoll-1||||INFO||||||| Sorted Sequenced Assignments ([[name=*, status=null, property=, dictionaryName=null, dictionarySource=null], [name=vf-module-number, status=null, property=, dictionaryName=vf-module-number, dictionarySource=default], [name=golden-vf-module-type, status=null, property=, dictionaryName=golden-vf-module-type, dictionarySource=processor-db], [name=interface-description, status=null, property=, dictionaryName=interface-description, dictionarySource=capability], [name=prefix-id, status=null, property=, dictionaryName=prefix-id, dictionarySource=default], [name=vfw_interface_ip, status=null, property=, dictionaryName=create_netbox_ip, dictionarySource=sdnc], [name=unit-number, status=null, property=, dictionaryName=unit-number, dictionarySource=input], [name=interface-name, status=null, property=, dictionaryName=interface-name, dictionarySource=input]])
      2019-09-15 12:21:31,884|||reactor-http-epoll-1||||INFO||||||| Batched Sequence : ([[[name=*, status=null, property=, dictionaryName=null, dictionarySource=null]], [[name=vf-module-number, status=null, property=, dictionaryName=vf-module-number, dictionarySource=default]], [[name=golden-vf-module-type, status=null, property=, dictionaryName=golden-vf-module-type, dictionarySource=processor-db]], [[name=interface-description, status=null, property=, dictionaryName=interface-description, dictionarySource=capability]], [[name=prefix-id, status=null, property=, dictionaryName=prefix-id, dictionarySource=default]], [[name=vfw_interface_ip, status=null, property=, dictionaryName=create_netbox_ip, dictionarySource=sdnc]], [[name=unit-number, status=null, property=, dictionaryName=unit-number, dictionarySource=input], [name=interface-name, status=null, property=, dictionaryName=interface-name, dictionarySource=input]]])
      2019-09-15 12:21:31,888|||reactor-http-epoll-1||||INFO||||||| Setting Resource Value ("3") for Resource Name (vf-module-number), definition(vf-module-number) of type (string)
      2019-09-15 12:21:31,911|||reactor-http-epoll-1||||INFO||||||| Resource resolution saved into database successfully : ([name=vf-module-number, status=success, property="3", dictionaryName=vf-module-number, dictionarySource=default])
      2019-09-15 12:21:31,925|||reactor-http-epoll-1||||INFO||||||| processor-db dictionary information : (select sdnctl.demo.value as value from sdnctl.demo where sdnctl.demo.id=:vfmoduleid), ({vfmoduleid=vf-module-number}), ({golden-vf-module-type=value})
      2019-09-15 12:21:31,925|||reactor-http-epoll-1||||INFO||||||| Parameter information : ({vfmoduleid=3})
      2019-09-15 12:21:31,937|||reactor-http-epoll-1||||INFO||||||| Response processing type(string)
      2019-09-15 12:21:31,942|||reactor-http-epoll-1||||INFO||||||| For template key (golden-vf-module-type) setting value as ([{"value":"vfw"}])
      2019-09-15 12:21:31,943|||reactor-http-epoll-1||||INFO||||||| Setting Resource Value ("vfw") for Resource Name (golden-vf-module-type), definition(golden-vf-module-type) of type (string)
      2019-09-15 12:21:31,970|||reactor-http-epoll-1||||INFO||||||| Resource resolution saved into database successfully : ([name=golden-vf-module-type, status=success, property="vfw", dictionaryName=golden-vf-module-type, dictionarySource=processor-db])
      2019-09-15 12:21:31,985|||reactor-http-epoll-1||||INFO||||||| creating resource resolution of script type(jython), reference name(Scripts/python/DescriptionExample.py) andinstanceDependencies([])
      2019-09-15 12:21:31,986|||reactor-http-epoll-1||||INFO||||||| Getting Jython Script Class(DescriptionExample)
      2019-09-15 12:21:32,139|||reactor-http-epoll-1||||INFO||||||| Component Object org.python.proxies.__main__$DescriptionExample$2@19767844
      2019-09-15 12:21:32,187|||reactor-http-epoll-1||||ERROR||||||| failed in ResourceAssignmentProcessor : failed to get execution property (vf-module-type)
      org.onap.ccsdk.cds.controllerblueprints.core.BluePrintProcessorException: failed to get execution property (vf-module-type)
              at org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceAssignmentRuntimeService.getResolutionStore(ResourceAssignmentRuntimeService.kt:28)
              at org.onap.ccsdk.cds.blueprintsprocessor.functions.resource.resolution.ResourceAssignmentRuntimeService.getStringFromResolutionStore(ResourceAssignmentRuntimeService.kt:40)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:188)
              at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:206)
              at org.python.core.PyObject.__call__(PyObject.java:497)
              at org.python.core.PyObject.__call__(PyObject.java:501)
              at org.python.core.PyMethod.__call__(PyMethod.java:141)
              at org.python.pycode._pyx4.process$2(<string>:37)
              at org.python.pycode._pyx4.call_function(<string>)
      
      

            silvius silvius
            silvius silvius
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: