From d5471900d0d05edb94225fc6895fafada649c869 Mon Sep 17 00:00:00 2001 From: Dan Timoney Date: Thu, 9 Apr 2020 13:56:45 -0400 Subject: Add special handling for BGP RouteDistinguisher Add special case code in MdsalHelper for BGP RouteDistinguisher class - a custom class implemented by OpenDaylight that does NOT follow the pattern of data object classes generated from Yang models by Yangtools Change-Id: I2ac78b4c86109cea17fb05a5f6b6a0c9b98a7d72 Issue-ID: CCSDK-2307 Signed-off-by: Dan Timoney --- artifacts/pom.xml | 2 +- dblib/installer/pom.xml | 2 +- dblib/pom.xml | 2 +- dblib/provider/pom.xml | 2 +- features/ccsdk-dblib/pom.xml | 2 +- features/ccsdk-filters/pom.xml | 2 +- features/ccsdk-sli-core-all/pom.xml | 2 +- features/ccsdk-sli/pom.xml | 2 +- features/ccsdk-sliPluginUtils/pom.xml | 2 +- features/ccsdk-sliapi/pom.xml | 2 +- features/ccsdk-slicore-utils/pom.xml | 2 +- features/features-sli-core/pom.xml | 2 +- features/installer/pom.xml | 2 +- features/pom.xml | 2 +- filters/installer/pom.xml | 2 +- filters/pom.xml | 2 +- filters/provider/pom.xml | 2 +- pom.xml | 2 +- sli/common/pom.xml | 2 +- sli/installer/pom.xml | 2 +- sli/model/pom.xml | 2 +- sli/pom.xml | 2 +- sli/provider-base/pom.xml | 2 +- sli/provider/pom.xml | 13 +++++++++++-- .../onap/ccsdk/sli/core/sli/provider/MdsalHelper.java | 16 +++++++++++++++- sliPluginUtils/installer/pom.xml | 2 +- sliPluginUtils/pom.xml | 2 +- sliPluginUtils/provider/pom.xml | 2 +- sliapi/installer/pom.xml | 2 +- sliapi/model/pom.xml | 2 +- sliapi/pom.xml | 2 +- sliapi/provider/pom.xml | 2 +- sliapi/springboot/pom.xml | 2 +- utils/installer/pom.xml | 2 +- utils/pom.xml | 2 +- utils/provider/pom.xml | 2 +- 36 files changed, 60 insertions(+), 37 deletions(-) diff --git a/artifacts/pom.xml b/artifacts/pom.xml index fa228f8b..18d9caa9 100755 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -17,7 +17,7 @@ org.onap.ccsdk.parent parent - 1.5.2 + 1.5.3-SNAPSHOT diff --git a/dblib/installer/pom.xml b/dblib/installer/pom.xml index d32dd562..fb296924 100755 --- a/dblib/installer/pom.xml +++ b/dblib/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.2 + 1.5.3-SNAPSHOT diff --git a/dblib/pom.xml b/dblib/pom.xml index 200b515d..6d0558d4 100755 --- a/dblib/pom.xml +++ b/dblib/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.2 + 1.5.3-SNAPSHOT diff --git a/dblib/provider/pom.xml b/dblib/provider/pom.xml index b823b4d4..72809d7e 100755 --- a/dblib/provider/pom.xml +++ b/dblib/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.2 + 1.5.3-SNAPSHOT diff --git a/features/ccsdk-dblib/pom.xml b/features/ccsdk-dblib/pom.xml index 8c18e1aa..ca022558 100644 --- a/features/ccsdk-dblib/pom.xml +++ b/features/ccsdk-dblib/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.2 + 1.5.3-SNAPSHOT diff --git a/features/ccsdk-filters/pom.xml b/features/ccsdk-filters/pom.xml index 4869a9a7..1b1f1cf0 100644 --- a/features/ccsdk-filters/pom.xml +++ b/features/ccsdk-filters/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.2 + 1.5.3-SNAPSHOT diff --git a/features/ccsdk-sli-core-all/pom.xml b/features/ccsdk-sli-core-all/pom.xml index 424eead1..8e60b7c1 100644 --- a/features/ccsdk-sli-core-all/pom.xml +++ b/features/ccsdk-sli-core-all/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.2 + 1.5.3-SNAPSHOT diff --git a/features/ccsdk-sli/pom.xml b/features/ccsdk-sli/pom.xml index 5ba96dc6..80c1e3d3 100644 --- a/features/ccsdk-sli/pom.xml +++ b/features/ccsdk-sli/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.2 + 1.5.3-SNAPSHOT diff --git a/features/ccsdk-sliPluginUtils/pom.xml b/features/ccsdk-sliPluginUtils/pom.xml index b69baaa5..40f6e923 100644 --- a/features/ccsdk-sliPluginUtils/pom.xml +++ b/features/ccsdk-sliPluginUtils/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.2 + 1.5.3-SNAPSHOT diff --git a/features/ccsdk-sliapi/pom.xml b/features/ccsdk-sliapi/pom.xml index 0d2ec8a7..b5a4ea4b 100644 --- a/features/ccsdk-sliapi/pom.xml +++ b/features/ccsdk-sliapi/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.2 + 1.5.3-SNAPSHOT diff --git a/features/ccsdk-slicore-utils/pom.xml b/features/ccsdk-slicore-utils/pom.xml index f09bf532..4ee03b60 100644 --- a/features/ccsdk-slicore-utils/pom.xml +++ b/features/ccsdk-slicore-utils/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.5.2 + 1.5.3-SNAPSHOT diff --git a/features/features-sli-core/pom.xml b/features/features-sli-core/pom.xml index bca56bea..94c2d024 100644 --- a/features/features-sli-core/pom.xml +++ b/features/features-sli-core/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.5.2 + 1.5.3-SNAPSHOT diff --git a/features/installer/pom.xml b/features/installer/pom.xml index ea571c7b..d17d13fd 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.2 + 1.5.3-SNAPSHOT diff --git a/features/pom.xml b/features/pom.xml index 87786871..78cfc0d1 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.2 + 1.5.3-SNAPSHOT diff --git a/filters/installer/pom.xml b/filters/installer/pom.xml index 441b68f9..d11bcdaf 100755 --- a/filters/installer/pom.xml +++ b/filters/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.2 + 1.5.3-SNAPSHOT diff --git a/filters/pom.xml b/filters/pom.xml index 6db7541f..b0ad6638 100644 --- a/filters/pom.xml +++ b/filters/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.2 + 1.5.3-SNAPSHOT diff --git a/filters/provider/pom.xml b/filters/provider/pom.xml index da0e261c..ac3f9d67 100755 --- a/filters/provider/pom.xml +++ b/filters/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.2 + 1.5.3-SNAPSHOT diff --git a/pom.xml b/pom.xml index b47fa8a4..19ddfd35 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.2 + 1.5.3-SNAPSHOT diff --git a/sli/common/pom.xml b/sli/common/pom.xml index 9ae8ae3f..e469919d 100755 --- a/sli/common/pom.xml +++ b/sli/common/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.2 + 1.5.3-SNAPSHOT diff --git a/sli/installer/pom.xml b/sli/installer/pom.xml index 409c5503..a8725800 100755 --- a/sli/installer/pom.xml +++ b/sli/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.2 + 1.5.3-SNAPSHOT diff --git a/sli/model/pom.xml b/sli/model/pom.xml index 9fa0be70..e873124d 100755 --- a/sli/model/pom.xml +++ b/sli/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.2 + 1.5.3-SNAPSHOT diff --git a/sli/pom.xml b/sli/pom.xml index d23abaa6..5caab4a0 100755 --- a/sli/pom.xml +++ b/sli/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.2 + 1.5.3-SNAPSHOT diff --git a/sli/provider-base/pom.xml b/sli/provider-base/pom.xml index 26d05cb7..d461a123 100644 --- a/sli/provider-base/pom.xml +++ b/sli/provider-base/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.2 + 1.5.3-SNAPSHOT diff --git a/sli/provider/pom.xml b/sli/provider/pom.xml index d9bc16e1..1d599266 100755 --- a/sli/provider/pom.xml +++ b/sli/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.2 + 1.5.3-SNAPSHOT @@ -69,14 +69,23 @@ org.opendaylight.controller sal-binding-api + provided org.opendaylight.mdsal.binding.model.ietf rfc6991 - + provided + + + org.opendaylight.bgpcep + bgp-concepts + 0.11.1 + provided + org.opendaylight.controller sal-core-api + provided diff --git a/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelper.java b/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelper.java index 122c8862..d3ab6c33 100755 --- a/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelper.java +++ b/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelper.java @@ -43,6 +43,8 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types. import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.PortNumber; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev180329.RouteDistinguisher; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev180329.RouteDistinguisherBuilder; import org.opendaylight.yangtools.yang.binding.Identifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -678,7 +680,19 @@ public class MdsalHelper { + "(" + paramValue + ")", e); } } - } else { + } else if ("RouteDistinguisher".equals(simpleName)) { + if ((paramValue != null) && (paramValue.length() > 0)) { + try { + RouteDistinguisher routeDistinguisher = RouteDistinguisherBuilder.getDefaultInstance(paramValue); + m.invoke(toObj, routeDistinguisher); + foundValue = true; + } catch (Exception e) { + LOG.error("Caught exception calling " + toClass.getName() + "." + m.getName() + + "(" + paramValue + ")", e); + } + } + } + else { // setter expects a yang-generated class. Need // to // create a builder to set it. diff --git a/sliPluginUtils/installer/pom.xml b/sliPluginUtils/installer/pom.xml index e7503cd2..f4e0afdb 100755 --- a/sliPluginUtils/installer/pom.xml +++ b/sliPluginUtils/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.2 + 1.5.3-SNAPSHOT diff --git a/sliPluginUtils/pom.xml b/sliPluginUtils/pom.xml index 38c448d9..f79980b2 100755 --- a/sliPluginUtils/pom.xml +++ b/sliPluginUtils/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.2 + 1.5.3-SNAPSHOT diff --git a/sliPluginUtils/provider/pom.xml b/sliPluginUtils/provider/pom.xml index 0bbdc5c1..fad3a35c 100755 --- a/sliPluginUtils/provider/pom.xml +++ b/sliPluginUtils/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.2 + 1.5.3-SNAPSHOT diff --git a/sliapi/installer/pom.xml b/sliapi/installer/pom.xml index 975c63ff..f052a45d 100755 --- a/sliapi/installer/pom.xml +++ b/sliapi/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.2 + 1.5.3-SNAPSHOT diff --git a/sliapi/model/pom.xml b/sliapi/model/pom.xml index 28aac056..24c33b7a 100755 --- a/sliapi/model/pom.xml +++ b/sliapi/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.2 + 1.5.3-SNAPSHOT diff --git a/sliapi/pom.xml b/sliapi/pom.xml index eed7a941..2d57fce8 100755 --- a/sliapi/pom.xml +++ b/sliapi/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.2 + 1.5.3-SNAPSHOT diff --git a/sliapi/provider/pom.xml b/sliapi/provider/pom.xml index 2ce3d7ea..d5b7a180 100755 --- a/sliapi/provider/pom.xml +++ b/sliapi/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.2 + 1.5.3-SNAPSHOT diff --git a/sliapi/springboot/pom.xml b/sliapi/springboot/pom.xml index e81362e0..1c074a58 100644 --- a/sliapi/springboot/pom.xml +++ b/sliapi/springboot/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent spring-boot-starter-parent - 1.5.2 + 1.5.3-SNAPSHOT diff --git a/utils/installer/pom.xml b/utils/installer/pom.xml index 5212329f..8455656f 100755 --- a/utils/installer/pom.xml +++ b/utils/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.2 + 1.5.3-SNAPSHOT diff --git a/utils/pom.xml b/utils/pom.xml index 628d508d..632f4280 100755 --- a/utils/pom.xml +++ b/utils/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.5.2 + 1.5.3-SNAPSHOT diff --git a/utils/provider/pom.xml b/utils/provider/pom.xml index 9c1b7c1e..f631e9ea 100644 --- a/utils/provider/pom.xml +++ b/utils/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.5.2 + 1.5.3-SNAPSHOT -- cgit 1.2.3-korg