diff options
-rw-r--r-- | pom.xml | 29 | ||||
-rw-r--r-- | standalone/pom.xml | 210 | ||||
-rw-r--r-- | standalone/src/main/assembly/Dockerfile | 12 | ||||
-rw-r--r-- | yang-comparator/pom.xml | 2 | ||||
-rw-r--r-- | yang-compiler/pom.xml | 407 | ||||
-rw-r--r-- | yang-compiler/src/main/java/org/onap/modeling/yangkit/compiler/plugin/yangtree/YangTreeGenerator.java | 6 |
6 files changed, 472 insertions, 194 deletions
@@ -1,4 +1,19 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright (C) 2023 Huawei Technologies Co., Ltd. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> @@ -14,11 +29,23 @@ <modules> <module>yang-compiler</module> <module>yang-comparator</module> + <module>standalone</module> </modules> <packaging>pom</packaging> <name>yangkit</name> <description>yangkit:yang tools</description> + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> + <sonar.projectVersion>${project.version}</sonar.projectVersion> + <maven.build.timestamp.format>yyyyMMdd'T'HHmm</maven.build.timestamp.format> + <nexusproxy>https://nexus.onap.org</nexusproxy> + <snapshotNexusPath>content/repositories/snapshots/</snapshotNexusPath> + <releaseNexusPath>content/repositories/releases/</releaseNexusPath> + <siteNexusPath>content/sites/site/${project.groupId}/${project.artifactId}/${project.version}/</siteNexusPath> + </properties> + <profiles> <profile> <id>release</id> @@ -60,4 +87,4 @@ </profiles> -</project>
\ No newline at end of file +</project> diff --git a/standalone/pom.xml b/standalone/pom.xml new file mode 100644 index 0000000..f58e82d --- /dev/null +++ b/standalone/pom.xml @@ -0,0 +1,210 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright (C) 2023 Huawei Technologies Co., Ltd. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.onap.modeling.yangkit</groupId> + <artifactId>yangkit-parent</artifactId> + <version>1.0.0-SNAPSHOT</version> + </parent> + + <groupId>org.onap.modeling.yangkit</groupId> + <artifactId>standalone</artifactId> + <version>1.0.0-SNAPSHOT</version> + <name>standalone</name> + <description>Distribute Binary Files and Docker Image for yang-kit</description> + + <properties> + <intent.version>5.2.0</intent.version> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> + <java.version>1.8</java.version> + <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format> + <linux64outputdir>target/assembly/linux64</linux64outputdir> + <dockeroutput>target/version/${intent.version}</dockeroutput> + </properties> + + <dependencyManagement> + <dependencies> + <dependency> + <groupId>org.onap.modeling.yangkit</groupId> + <artifactId>yang-compiler</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> + </dependencyManagement> + + <build> + <finalName>yang-compiler</finalName> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-resources-plugin</artifactId> + <executions> + <execution> + <id>copy-resources-linux64</id> + <phase>process-resources</phase> + <goals> + <goal>copy-resources</goal> + </goals> + <configuration> + <outputDirectory>${linux64outputdir}</outputDirectory> + <resources> + <resource> + <directory>src/main/assembly/</directory> + <filtering>false</filtering> + <includes> + <include>**/*</include> + </includes> + <excludes> + <exclude>Dockerfile</exclude> + </excludes> + </resource> + </resources> + <overwrite>true</overwrite> + </configuration> + </execution> + <execution> + <id>copy-dockerfile</id> + <phase>process-resources</phase> + <goals> + <goal>copy-resources</goal> + </goals> + <configuration> + <outputDirectory>${dockeroutput}</outputDirectory> + <resources> + <resource> + <directory>src/main/assembly/</directory> + <filtering>false</filtering> + <includes> + <include>Dockerfile</include> + </includes> + </resource> + </resources> + <overwrite>true</overwrite> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <version>2.8</version> + <executions> + <execution> + <id>copy-jar-linux64</id> + <goals> + <goal>copy</goal> + </goals> + <phase>prepare-package</phase> + <configuration> + <artifactItems> + <artifactItem> + <groupId>org.onap.modeling.yangkit</groupId> + <artifactId>yang-compiler</artifactId> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>${linux64outputdir}</outputDirectory> + <destFileName>modeling-yang-compiler.jar</destFileName> + </artifactItem> + </artifactItems> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-antrun-plugin</artifactId> + <version>1.8</version> + <executions> + <execution> + <id>distribution</id> + <phase>package</phase> + <goals> + <goal>run</goal> + </goals> + <configuration> + <tasks name="${project.artifactId}"> + <tar destfile="${dockeroutput}/modeling-yang-kit-${project.version}-linux64.tar.gz" longfile="posix" compression="gzip"> + <tarfileset dir="${linux64outputdir}" filemode="0644" dirmode="0755"> + <exclude name="**/*.sh"/> + </tarfileset> + <tarfileset dir="${linux64outputdir}" filemode="0755" dirmode="0755"> + <include name="**/*.sh"/> + </tarfileset> + </tar> + <attachartifact file="${dockeroutput}/modeling-yang-kit-${project.version}-linux64.tar.gz" classifier="linux64" type="tar.gz"/> + </tasks> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + + <profiles> + <profile> + <id>docker</id> + <build> + <plugins> + <plugin> + <groupId>io.fabric8</groupId> + <artifactId>docker-maven-plugin</artifactId> + <version>0.16.5</version> + <inherited>false</inherited> + <configuration> + <images> + <image> + <name>onap/modeling-yang-kit</name> + <build> + <cleanup>try</cleanup> + <dockerFileDir>${basedir}/${dockeroutput}</dockerFileDir> + <dockerFile>${basedir}/${dockeroutput}/Dockerfile</dockerFile> + <tags> + <tag>${intent.version}-SNAPSHOT-latest</tag> + <tag>${intent.version}-STAGING-latest</tag> + <tag>${intent.version}-STAGING-${maven.build.timestamp}</tag> + </tags> + </build> + </image> + </images> + </configuration> + <executions> + <execution> + <id>generate-images</id> + <phase>package</phase> + <goals> + <goal>build</goal> + </goals> + </execution> + <execution> + <id>push-images</id> + <phase>deploy</phase> + <goals> + <goal>build</goal> + <goal>push</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + </profiles> + +</project> diff --git a/standalone/src/main/assembly/Dockerfile b/standalone/src/main/assembly/Dockerfile new file mode 100644 index 0000000..2bbc781 --- /dev/null +++ b/standalone/src/main/assembly/Dockerfile @@ -0,0 +1,12 @@ +FROM nexus3.onap.org:10001/onap/integration-java11:9.0.0 + +USER root + +RUN mkdir /home/yangkit + +ADD modeling-yang-kit-*-linux64.tar.gz /home/yangkit + +WORKDIR /home/yangkit + +ENTRYPOINT ["sh", "-c"] +CMD ["exec java -jar modeling-yang-compiler.jar"] diff --git a/yang-comparator/pom.xml b/yang-comparator/pom.xml index 38884f8..1eff96a 100644 --- a/yang-comparator/pom.xml +++ b/yang-comparator/pom.xml @@ -60,7 +60,7 @@ <dependency> <groupId>io.github.yang-central.yangkit</groupId> <artifactId>yangkit-parser</artifactId> - <version>1.3.6</version> + <version>1.4.0</version> </dependency> <dependency> <groupId>org.onap.modeling.yangkit</groupId> diff --git a/yang-compiler/pom.xml b/yang-compiler/pom.xml index 9199c82..6ee4bc6 100644 --- a/yang-compiler/pom.xml +++ b/yang-compiler/pom.xml @@ -1,189 +1,218 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.onap.modeling.yangkit</groupId>
- <artifactId>yangkit-parent</artifactId>
- <version>1.0.0-SNAPSHOT</version>
- </parent>
-
- <groupId>org.onap.modeling.yangkit</groupId>
- <artifactId>yang-compiler</artifactId>
- <version>1.0.0-SNAPSHOT</version>
- <properties>
- <maven.compiler.source>8</maven.compiler.source>
- <maven.compiler.target>8</maven.compiler.target>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
- <maven.compiler.encoding>UTF-8</maven.compiler.encoding>
- </properties>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>3.1.0</version>
- <configuration>
- <archive>
- <manifest>
- <addClasspath>true</addClasspath>
- <mainClass>org.onap.modeling.yangkit.compiler.app.YangCompilerRunner</mainClass>
- <classpathPrefix>libs/</classpathPrefix>
- </manifest>
- <!--
- <manifestEntries>
- <Class-path>libs/yangkit-common-1.0-SNAPSHOT.jar libs/yangkit-common-utils-1.0-SNAPSHOT.jar libs/yangkit-data-api-1.0-SNAPSHOT.jar libs/yangkit-model-api-1.0-SNAPSHOT.jar libs/yangkit-model-impl-1.0-SNAPSHOT.jar libs/yangkit-parser-1.0-SNAPSHOT.jar libs/yangkit-xpath-api-1.0-SNAPSHOT.jar libs/yangkit-xpath-impl-1.0-SNAPSHOT.jar</Class-path>
- </manifestEntries>-->
- </archive>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <version>3.1.1</version>
- <executions>
- <execution>
- <id>copy-dependencies</id>
- <phase>package</phase>
- <goals>
- <goal>copy-dependencies</goal>
- </goals>
- <configuration>
- <outputDirectory>
- ${project.build.directory}/libs
- </outputDirectory>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>io.github.yang-central.yangkit</groupId>
- <artifactId>yangkit-parser</artifactId>
- <version>1.3.6</version>
- </dependency>
-
- <dependency>
- <groupId>jaxen</groupId>
- <artifactId>jaxen</artifactId>
- <version>2.0.0</version>
- </dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-lang3</artifactId>
- <version>3.12.0</version>
- </dependency>
- <dependency>
- <groupId>org.dom4j</groupId>
- <artifactId>dom4j</artifactId>
- <version>2.1.4</version>
- </dependency>
- <!-- https://mvnrepository.com/artifact/com.google.code.gson/gson -->
- <dependency>
- <groupId>com.google.code.gson</groupId>
- <artifactId>gson</artifactId>
- <version>2.10.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.poi</groupId>
- <artifactId>poi</artifactId>
- <version>5.2.3</version>
- </dependency>
- <dependency>
- <groupId>org.apache.poi</groupId>
- <artifactId>poi-ooxml</artifactId>
- <version>5.2.3</version>
- </dependency>
- </dependencies>
- <name>yang compiler</name>
- <description>yang compiler: compile yang modules regardless where the dependencies are (by resolve and download
- dependencies automatically)</description>
- <profiles>
- <profile>
- <id>release</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-release-plugin</artifactId>
- <version>2.5.3</version>
- <configuration>
- <autoVersionSubmodules>true</autoVersionSubmodules>
- <useReleaseProfile>false</useReleaseProfile>
- <releaseProfiles>release</releaseProfiles>
- <goals>deploy</goals>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-source-plugin</artifactId>
- <version>2.2.1</version>
- <executions>
- <execution>
- <id>attach-sources</id>
- <goals>
- <goal>jar-no-fork</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-<!--
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <version>3.4.0</version>
- <configuration>
- <source>8</source>
- <detectJavaApiLink>false</detectJavaApiLink>
- <locale>en_US</locale>
- <charset>UTF-8</charset>
- <encoding>UTF-8</encoding>
- <docencoding>UTF-8</docencoding>
-
- <doclet>ch.raffael.doclets.pegdown.PegdownDoclet</doclet>
- <docletArtifact>
- <groupId>ch.raffael.pegdown-doclet</groupId>
- <artifactId>pegdown-doclet</artifactId>
- <version>1.1</version>
- </docletArtifact>
- <useStandardDocletOptions>true</useStandardDocletOptions>
- </configuration>
- <executions>
- <execution>
- <id>attach-javadocs</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-gpg-plugin</artifactId>
- <version>1.5</version>
- <executions>
- <execution>
- <id>sign-artifacts</id>
- <phase>verify</phase>
- <goals>
- <goal>sign</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
--->
- </plugins>
- </build>
- </profile>
-
- </profiles>
-
-</project>
+<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright (C) 2023 Huawei Technologies Co., Ltd. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.onap.modeling.yangkit</groupId> + <artifactId>yangkit-parent</artifactId> + <version>1.0.0-SNAPSHOT</version> + </parent> + + <groupId>org.onap.modeling.yangkit</groupId> + <artifactId>yang-compiler</artifactId> + <version>1.0.0-SNAPSHOT</version> + <name>yang compiler</name> + <description>Source code of compile yang modules</description> + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> + <java.version>11</java.version> + <sonar.language>java</sonar.language> + <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath> + <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths> + <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero> + <sonar.projectVersion>${project.version}</sonar.projectVersion> + <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis> + <junit.vintage.version>5.9.0-RC1</junit.vintage.version> + <junit.platform.version>1.9.0-RC1</junit.platform.version> + </properties> + <dependencies> + <dependency> + <groupId>io.github.yang-central.yangkit</groupId> + <artifactId>yangkit-parser</artifactId> + <version>1.4.0</version> + </dependency> + + <dependency> + <groupId>jaxen</groupId> + <artifactId>jaxen</artifactId> + <version>2.0.0</version> + </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-lang3</artifactId> + <version>3.12.0</version> + </dependency> + <dependency> + <groupId>org.dom4j</groupId> + <artifactId>dom4j</artifactId> + <version>2.1.4</version> + </dependency> + <!-- https://mvnrepository.com/artifact/com.google.code.gson/gson --> + <dependency> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + <version>2.10.1</version> + </dependency> + <dependency> + <groupId>org.apache.poi</groupId> + <artifactId>poi</artifactId> + <version>5.2.3</version> + </dependency> + <dependency> + <groupId>org.apache.poi</groupId> + <artifactId>poi-ooxml</artifactId> + <version>5.2.3</version> + </dependency> + </dependencies> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <version>3.1.0</version> + <configuration> + <archive> + <manifest> + <addClasspath>true</addClasspath> + <mainClass>org.onap.modeling.yangkit.compiler.app.YangCompilerRunner</mainClass> + <classpathPrefix>libs/</classpathPrefix> + </manifest> + </archive> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.3</version> + <configuration> + <source>1.8</source> + <target>1.8</target> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <version>3.1.1</version> + <executions> + <execution> + <id>copy-dependencies</id> + <phase>package</phase> + <goals> + <goal>copy-dependencies</goal> + </goals> + <configuration> + <outputDirectory> + ${project.build.directory}/libs + </outputDirectory> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <version>2.19</version> + <configuration> + <testFailureIgnore>true</testFailureIgnore> + <includes> + <include>**/*Spec*</include> + <include>**/Test*.java</include> + <include>**/*Test.java</include> + <include>**/*TestCase.java</include> + <include>**/Test*.scala</include> + <include>**/*Test.scala</include> + <include>**/*TestCase.scala</include> + </includes> + </configuration> + </plugin> + <plugin> + <groupId>org.jacoco</groupId> + <artifactId>jacoco-maven-plugin</artifactId> + <executions> + <execution> + <id>prepare-agent</id> + <goals> + <goal>prepare-agent</goal> + </goals> + </execution> + <execution> + <id>report</id> + <goals> + <goal>report</goal> + </goals> + <configuration> + <dataFile>${project.build.directory}/code-coverage/jacoco.exec</dataFile> + <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + + <resources> + <resource> + <directory>src/main/resources</directory> + </resource> + <resource> + <directory>src/main/java</directory> + <filtering>false</filtering> + </resource> + </resources> + </build> + <profiles> + <profile> + <id>release</id> + <activation> + <activeByDefault>true</activeByDefault> + </activation> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-release-plugin</artifactId> + <version>2.5.3</version> + <configuration> + <autoVersionSubmodules>true</autoVersionSubmodules> + <useReleaseProfile>false</useReleaseProfile> + <releaseProfiles>release</releaseProfiles> + <goals>deploy</goals> + </configuration> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-source-plugin</artifactId> + <version>2.2.1</version> + <executions> + <execution> + <id>attach-sources</id> + <goals> + <goal>jar-no-fork</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + + </profiles> + +</project> diff --git a/yang-compiler/src/main/java/org/onap/modeling/yangkit/compiler/plugin/yangtree/YangTreeGenerator.java b/yang-compiler/src/main/java/org/onap/modeling/yangkit/compiler/plugin/yangtree/YangTreeGenerator.java index 6561ab4..03cbd82 100644 --- a/yang-compiler/src/main/java/org/onap/modeling/yangkit/compiler/plugin/yangtree/YangTreeGenerator.java +++ b/yang-compiler/src/main/java/org/onap/modeling/yangkit/compiler/plugin/yangtree/YangTreeGenerator.java @@ -61,7 +61,7 @@ import org.yangcentral.yangkit.model.api.stmt.YangStatement; import org.yangcentral.yangkit.model.api.stmt.YangUnknown; import org.yangcentral.yangkit.model.api.stmt.ext.AugmentStructure; import org.yangcentral.yangkit.model.api.stmt.ext.YangData; -import org.yangcentral.yangkit.model.api.stmt.ext.YangDataStructure; +import org.yangcentral.yangkit.model.api.stmt.ext.YangStructure; import org.yangcentral.yangkit.utils.file.FileUtil; @@ -100,7 +100,7 @@ public class YangTreeGenerator implements YangCompilerPlugin { new QName("urn:ietf:params:xml:ns:yang:ietf-restconf", "yang-data")); // yang structure extension - List<YangUnknown> yangStructureList = module.getUnknowns(YangDataStructure.YANG_KEYWORD); + List<YangUnknown> yangStructureList = module.getUnknowns(YangStructure.YANG_KEYWORD); // augment structure extension List<YangUnknown> augmentStructureList = module.getUnknowns(AugmentStructure.YANG_KEYWORD); @@ -180,7 +180,7 @@ public class YangTreeGenerator implements YangCompilerPlugin { //structures if (!yangStructureList.isEmpty()) { for (YangUnknown unknown : yangStructureList) { - YangDataStructure structure = (YangDataStructure) unknown; + YangStructure structure = (YangStructure) unknown; sb.append(TWO_SPACES); sb.append("structure"); sb.append(" "); |