aboutsummaryrefslogtreecommitdiffstats
path: root/appc-asdc-listener/appc-yang-generator
diff options
context:
space:
mode:
authorPatrick Brady <pb071s@att.com>2017-07-28 11:29:23 -0700
committerPatrick Brady <pb071s@att.com>2017-08-02 15:43:44 +0000
commit38713207b817ed4700f630748c681116338d32f0 (patch)
tree9eb2097cee8d85ac14f17e3a280ae8aefb69d9de /appc-asdc-listener/appc-yang-generator
parent771ac55e29d099d8bbf783612de975047d75ab12 (diff)
Merging in bug fixes
Change-Id: I85da90b9ba0d03149f42035a820c76ef0285e413 Signed-off-by: Patrick Brady <pb071s@att.com> Issue: APPC-100
Diffstat (limited to 'appc-asdc-listener/appc-yang-generator')
-rw-r--r--appc-asdc-listener/appc-yang-generator/pom.xml34
-rw-r--r--appc-asdc-listener/appc-yang-generator/src/main/java/org/openecomp/appc/yang/impl/YANGGeneratorImpl.java4
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);