1 package org.onap.sdc.impl;
3 import org.onap.sdc.toscaparser.api.NodeTemplate;
4 import org.testng.annotations.Test;
5 import org.onap.sdc.tosca.parser.api.ISdcCsarHelper;
6 import org.onap.sdc.tosca.parser.exceptions.SdcToscaParserException;
7 import org.onap.sdc.tosca.parser.impl.SdcToscaParserFactory;
11 import static org.onap.sdc.impl.SdcToscaParserBasicTest.getCsarHelper;
15 static SdcToscaParserFactory factory;
16 static ISdcCsarHelper fdntCsarHelper;
19 public void testNoValidationIssues() throws SdcToscaParserException {
22 // factory = SdcToscaParserFactory.getInstance();
23 // fdntCsarHelper = getCsarHelper("csars/service-Oren1-csar-4.csar");
26 // List<NodeTemplate> serviceNodeTemplatesByType = fdntCsarHelper.getServiceNodeTemplatesByType("org.openecomp.nodes.ForwardingPath");
28 // String target_range = fdntCsarHelper.getNodeTemplatePropertyLeafValue(serviceNodeTemplatesByType.get(0), "target_range");
33 protected static ISdcCsarHelper getCsarHelper(String path) throws SdcToscaParserException {
34 System.out.println("Parsing CSAR "+path+"...");
35 String fileStr1 = SdcToscaParserBasicTest.class.getClassLoader().getResource(path).getFile();
36 File file1 = new File(fileStr1);
37 ISdcCsarHelper sdcCsarHelper = factory.getSdcCsarHelper(file1.getAbsolutePath());