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

SDC creates invalid TOSCA templates for VFs

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not Done
    • Icon: High High
    • El Alto Release
    • Dublin Release
    • None
    • None

      What

      Many kinds of VFs created using SDC end up having an invalid TOSCA template. The user is not given any indication of its invalidity so probably no validation is ever run, even at certify VF.

      Why this matters on a higher level of things is that any services containing such invalid VFs (such as whose with DCAE blueprints according to https://wiki.onap.org/display/DW/How+to+Create+a+Service+with+a+Monitoring+Configuration+using+SDC) will fail parsing on run time components and further causing those aspects of the service to be unavailable for any run time action. 

      Invalid here means that sdc/sdc-tosca fails with the produced CSAR and also modeling/toscaparsers/javatoscachecker fails with it.

      sdc/sdc-tosca:

      The actual command run is a thin wrapper around SdcCsarHelper. While JTosca reports teh problems only warnings, the parsed result does not contain any VFs.

      $ java -jar target/sdc-tosca-cli-0.0.1-SNAPSHOT-jar-with-dependencies.jar ~/Downloads/resource-Emptydcaevf-csar.csar
      2019-05-27 13:07:34 INFO Reflections:232 - Reflections took 40 ms to scan 1 urls, producing 4 keys and 4 values
      2019-05-27 13:07:35 INFO Reflections:232 - Reflections took 20 ms to scan 1 urls, producing 4 keys and 4 values
      2019-05-27 13:07:36 WARN SdcToscaParserFactory:138 - ####################################################################################################
      2019-05-27 13:07:36 WARN SdcToscaParserFactory:139 - CSAR Warnings found! CSAR name - C:/Users/puhaatim/Downloads/resource-Emptydcaevf-csar.csar
      2019-05-27 13:07:36 WARN SdcToscaParserFactory:140 - ToscaTemplate - verifyTemplate - 1 Parsing Warning occurred...
      2019-05-27 13:07:36 WARN SdcToscaParserFactory:142 - JTosca Exception [JE003]: MissingRequiredFieldError: Data value of type "org.openecomp.datatypes.Naming" is missing required field(s) "[supplemental_data]". CSAR name - C:/Users/puhaatim/Downloads/resource-Emptydcaevf-csar.csar
      2019-05-27 13:07:36 WARN SdcToscaParserFactory:144 - ####################################################################################################
      CSAR Conformance level 9.0
      Services []
      VFs []

      modeling/toscaparsers/javatoscachecker:

      $ java -jar Checker-1.2.0-SNAPSHOT-jar-with-dependencies.jar ~/Downloads/resource-Emptydcaevf-template.yml
      file:/C:/Users/puhaatim/Downloads/resource-Emptydcaevf-template.yml

      13 errors
      [/topology_template/inputs/skip_post_instantiation_configuration] key 'value:' is required.
      [/topology_template/inputs/nf_naming] key 'value:' is required.
      [/topology_template/inputs/multi_stage_design] key 'value:' is required.
      [/topology_template/inputs/nf_naming_code] key 'value:' is required.
      [/topology_template/inputs/nf_function] key 'value:' is required.
      [/topology_template/inputs/availability_zone_max_count] key 'value:' is required.
      [/topology_template/inputs/sdnc_artifact_name] key 'value:' is required.
      [/topology_template/inputs/max_instances] key 'value:' is required.
      [/topology_template/inputs/nf_type] key 'value:' is required.
      [/topology_template/inputs/sdnc_model_version] key 'value:' is required.
      [/topology_template/inputs/nf_role] key 'value:' is required.
      [/topology_template/inputs/min_instances] key 'value:' is required.
      [/topology_template/inputs/sdnc_model_name] key 'value:' is required.

      Target C:\Users\puhaatim\Downloads\resource-Emptydcaevf-template.yml at file:/C:/Users/puhaatim/Downloads/resource-Emptydcaevf-template.yml

      The simplest VF exhibiting this is the empty VF. An example CSAR Attached. 

      Expected Result

      **SDC-generated TOSCA templates to be valid as interpreted by all ONAP TOSCA parsers. In case of requirements for the user to provide extra information for completeness, these should be made clear to the user. In particular SDC should validate the VFs before allowing "good" sounding state like "certified". 

      Reproducible

      Yes, every time

            os0695 os0695
            t.puha t.puha
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: