diff options
author | Michal Cmarada <michal.cmarada@pantheon.tech> | 2018-09-25 11:21:09 +0200 |
---|---|---|
committer | Michal Cmarada <mcmarada@cisco.com> | 2018-09-28 12:54:22 +0200 |
commit | 5bbd9feb84660d06fe635a0cd4cbdf45b110665c (patch) | |
tree | 934a3fb9159f832cce5cfbbfd03f9d68c306bf33 /vpp-integration/api-docs/core | |
parent | 9b0967210e3e50d0b52475cfc02e636dbfa28421 (diff) |
Fix bugs after bumping to Fluorine ODL dependencies (HONEYCOMB-433)
Change-Id: I99b630f97144770849679a04efccaf7fc9868cb6
Signed-off-by: Michal Cmarada <michal.cmarada@pantheon.tech>
Diffstat (limited to 'vpp-integration/api-docs/core')
3 files changed, 13 insertions, 4 deletions
diff --git a/vpp-integration/api-docs/core/pom.xml b/vpp-integration/api-docs/core/pom.xml index d0b7454c8..aa2fc6316 100644 --- a/vpp-integration/api-docs/core/pom.xml +++ b/vpp-integration/api-docs/core/pom.xml @@ -92,6 +92,10 @@ <version>${honeycomb.version}</version> </dependency> <dependency> + <groupId>org.opendaylight.mdsal</groupId> + <artifactId>yang-binding</artifactId> + </dependency> + <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>${junit.version}</version> diff --git a/vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/ModelTypeIndex.java b/vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/ModelTypeIndex.java index 9fd5976b7..f12c2e606 100644 --- a/vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/ModelTypeIndex.java +++ b/vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/ModelTypeIndex.java @@ -41,7 +41,7 @@ class ModelTypeIndex { ModelTypeIndex() throws IOException { namespaceToModuleIndex = collectAllModules(this.getClass().getClassLoader()) .stream() - .collect(toMap(YangModelKey::new, YangModuleInfo::getName)); + .collect(toMap(YangModelKey::new, yangModuleInfo -> yangModuleInfo.getName().toString())); } private static YangModelBindingProvider getModuleBindingProviderInstance(final Class<?> aClass) { diff --git a/vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/YangModelKey.java b/vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/YangModelKey.java index 2bc5bc5da..a2d4b9d06 100644 --- a/vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/YangModelKey.java +++ b/vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/YangModelKey.java @@ -14,15 +14,20 @@ * limitations under the License. */ -package io.fd.hc2vpp.docs.core;import org.opendaylight.yangtools.yang.binding.YangModuleInfo; +package io.fd.hc2vpp.docs.core; + +import java.util.Optional; +import org.opendaylight.yangtools.yang.binding.YangModuleInfo; +import org.opendaylight.yangtools.yang.common.Revision; final class YangModelKey { private final String namespace; private final String revision; YangModelKey(final YangModuleInfo moduleInfo) { - this.namespace = moduleInfo.getNamespace(); - this.revision = moduleInfo.getRevision(); + this.namespace = moduleInfo.getName().getNamespace().toString(); + Optional<Revision> optRevision = moduleInfo.getName().getRevision(); + this.revision = optRevision.isPresent() ? optRevision.get().toString() : ""; } YangModelKey(final String namespace, final String revision) { |