# ONAP SDC-Tosca --- --- # Introduction ONAP SDC-Tosca is delivered as helper JAR that can be used by clients that work with SDC TOSCA CSAR files. It parses the CSAR and returns the model object which represents the CSAR contents, through designated function calls with SDC flavour. It uses the underlying generic JTOSCA parser. # Compiling ONAP JTOSCA ONAP SDC-Tosca can be compiled easily using maven command: `mvn clean install` The result is JAR file under "target" folder # Testing a CSAR locally to run the parser locally you can use the MyTest Junit test to easily execute the parser on your own input. 1. to run it place your csar in **sdc-tosca\src\test\resources\csars** 2. Go to the test class located at **sdc-tosca\src\test\java\org\onap\sdc\impl\MyTest.java** 3. un comment the logic ther and update the csar name you plced in the step above: ```java SdcToscaParserFactory factory = SdcToscaParserFactory.getInstance(); ISdcCsarHelper = getCsarHelper("csars/"); //example of functions //get node type by name List serviceNodeTemplatesByType = fdntCsarHelper.getServiceNodeTemplatesByType("org.openecomp.nodes.ForwardingPath"); //get node type property String target_range = fdntCsarHelper.getNodeTemplatePropertyLeafValue(serviceNodeTemplatesByType.get(0), "target_range"); ``` # Adding the SDC-Tosca to you project the SDC tosca is avilalble as a maven depandency. to use add the folowing depandency to your POM file: ``` org.onap.sdc.sdc-tosca sdc-tosca 1.4.1 ``` # Getting Help ##### [Mailing list](mailto:onap-sdc@lists.onap.org) ##### [JIRA](http://jira.onap.org) ##### [WIKI](https://wiki.onap.org/display/DW/Service+Design+and+Creation+%28SDC%29+Portal) ##### [TOSCA Prser AID]((https://wiki.onap.org/display/DW/Service+Design+and+Creation+%28SDC%29+Portal)) # Release notes ## 1.4.1 ### Features: 1. **disable max conformance level validation**: until this version the parser had the definition of the max and min conformance level of the CSAR version which it supports. the conformance level is generated by sdc and as a result the two had to be aligned, over wise the CSAR will fail on parsing. from this version the max version will no longer be checked by the parser. 2. **Operations support**: add support for parsing the Operations in the tosca models.