diff options
Diffstat (limited to 'appc-asdc-listener/appc-yang-generator')
-rw-r--r-- | appc-asdc-listener/appc-yang-generator/pom.xml | 34 | ||||
-rw-r--r-- | appc-asdc-listener/appc-yang-generator/src/main/java/org/openecomp/appc/yang/impl/YANGGeneratorImpl.java | 4 |
2 files changed, 35 insertions, 3 deletions
diff --git a/appc-asdc-listener/appc-yang-generator/pom.xml b/appc-asdc-listener/appc-yang-generator/pom.xml index 6834bd85d..473524104 100644 --- a/appc-asdc-listener/appc-yang-generator/pom.xml +++ b/appc-asdc-listener/appc-yang-generator/pom.xml @@ -41,7 +41,39 @@ <artifactId>openecomp-tosca-lib</artifactId> <version>${toscalib.version}</version> </dependency> + <dependency> + <groupId>org.openecomp.sdc.common</groupId> + <artifactId>openecomp-tosca-datatype</artifactId> + <version>${toscalib.version}</version> + </dependency> </dependencies> - + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-shade-plugin</artifactId> + <executions> + <execution> + <phase>package</phase> + <goals> + <goal>shade</goal> + </goals> + </execution> + </executions> + <configuration> + <finalName>${artifactId}-${version}</finalName> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.6.1</version> + <configuration> + <source>1.8</source> + <target>1.8</target> + </configuration> + </plugin> + </plugins> + </build> </project>
\ No newline at end of file diff --git a/appc-asdc-listener/appc-yang-generator/src/main/java/org/openecomp/appc/yang/impl/YANGGeneratorImpl.java b/appc-asdc-listener/appc-yang-generator/src/main/java/org/openecomp/appc/yang/impl/YANGGeneratorImpl.java index bc5273252..246563932 100644 --- a/appc-asdc-listener/appc-yang-generator/src/main/java/org/openecomp/appc/yang/impl/YANGGeneratorImpl.java +++ b/appc-asdc-listener/appc-yang-generator/src/main/java/org/openecomp/appc/yang/impl/YANGGeneratorImpl.java @@ -42,7 +42,7 @@ import org.openecomp.appc.yang.type.YangTypes; import org.openecomp.sdc.tosca.datatypes.model.NodeType; import org.openecomp.sdc.tosca.datatypes.model.PropertyDefinition; import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate; -import org.openecomp.sdc.tosca.services.yamlutil.ToscaExtensionYamlUtil; +import org.openecomp.sdc.tosca.services.YamlUtil; import java.io.*; import java.util.HashMap; @@ -127,7 +127,7 @@ public class YANGGeneratorImpl implements YANGGenerator { private Map<String,Object> parseTosca(String tosca) throws YANGGenerationException { Log.info("Entered into parseTosca."); - ServiceTemplate serviceTemplate = new ToscaExtensionYamlUtil().yamlToObject(tosca, ServiceTemplate.class); + ServiceTemplate serviceTemplate = new YamlUtil().yamlToObject(tosca, ServiceTemplate.class); Map<String, NodeType> nodeTypeMap = serviceTemplate.getNode_types(); String kind = nodeTypeMap.keySet().toArray(new String[0])[0]; NodeType nodeType = nodeTypeMap.get(kind); |