Add special handling for BGP RouteDistinguisher 16/105716/5
authorDan Timoney <dtimoney@att.com>
Thu, 9 Apr 2020 17:56:45 +0000 (13:56 -0400)
committerDan Timoney <dtimoney@att.com>
Mon, 13 Apr 2020 18:37:06 +0000 (14:37 -0400)
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 <dtimoney@att.com>
36 files changed:
artifacts/pom.xml
dblib/installer/pom.xml
dblib/pom.xml
dblib/provider/pom.xml
features/ccsdk-dblib/pom.xml
features/ccsdk-filters/pom.xml
features/ccsdk-sli-core-all/pom.xml
features/ccsdk-sli/pom.xml
features/ccsdk-sliPluginUtils/pom.xml
features/ccsdk-sliapi/pom.xml
features/ccsdk-slicore-utils/pom.xml
features/features-sli-core/pom.xml
features/installer/pom.xml
features/pom.xml
filters/installer/pom.xml
filters/pom.xml
filters/provider/pom.xml
pom.xml
sli/common/pom.xml
sli/installer/pom.xml
sli/model/pom.xml
sli/pom.xml
sli/provider-base/pom.xml
sli/provider/pom.xml
sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelper.java
sliPluginUtils/installer/pom.xml
sliPluginUtils/pom.xml
sliPluginUtils/provider/pom.xml
sliapi/installer/pom.xml
sliapi/model/pom.xml
sliapi/pom.xml
sliapi/provider/pom.xml
sliapi/springboot/pom.xml
utils/installer/pom.xml
utils/pom.xml
utils/provider/pom.xml

index fa228f8..18d9caa 100755 (executable)
@@ -17,7 +17,7 @@
        <parent>
                <groupId>org.onap.ccsdk.parent</groupId>
                <artifactId>parent</artifactId>
-               <version>1.5.2</version>
+               <version>1.5.3-SNAPSHOT</version>
        </parent>
 
        <dependencyManagement>
index d32dd56..fb29692 100755 (executable)
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.ccsdk.parent</groupId>
                <artifactId>odlparent-lite</artifactId>
-               <version>1.5.2</version>
+               <version>1.5.3-SNAPSHOT</version>
                <relativePath/>
        </parent>
 
index 200b515..6d0558d 100755 (executable)
@@ -5,7 +5,7 @@
    <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>1.5.2</version>
+        <version>1.5.3-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
index b823b4d..72809d7 100755 (executable)
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.ccsdk.parent</groupId>
                <artifactId>binding-parent</artifactId>
-               <version>1.5.2</version>
+               <version>1.5.3-SNAPSHOT</version>
                <relativePath/>
        </parent>
 
index 8c18e1a..ca02255 100644 (file)
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.ccsdk.parent</groupId>
                <artifactId>single-feature-parent</artifactId>
-               <version>1.5.2</version>
+               <version>1.5.3-SNAPSHOT</version>
                <relativePath/>
        </parent>
 
index 4869a9a..1b1f1cf 100644 (file)
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.ccsdk.parent</groupId>
                <artifactId>single-feature-parent</artifactId>
-               <version>1.5.2</version>
+               <version>1.5.3-SNAPSHOT</version>
                <relativePath/>
        </parent>
 
index 424eead..8e60b7c 100644 (file)
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.ccsdk.parent</groupId>
                <artifactId>single-feature-parent</artifactId>
-               <version>1.5.2</version>
+               <version>1.5.3-SNAPSHOT</version>
                <relativePath/>
        </parent>
 
index 5ba96dc..80c1e3d 100644 (file)
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.ccsdk.parent</groupId>
                <artifactId>single-feature-parent</artifactId>
-               <version>1.5.2</version>
+               <version>1.5.3-SNAPSHOT</version>
                <relativePath/>
        </parent>
 
index b69baaa..40f6e92 100644 (file)
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>1.5.2</version>
+        <version>1.5.3-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
index 0d2ec8a..b5a4ea4 100644 (file)
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>1.5.2</version>
+        <version>1.5.3-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
index f09bf53..4ee03b6 100644 (file)
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>1.5.2</version>
+        <version>1.5.3-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
index bca56be..94c2d02 100644 (file)
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>feature-repo-parent</artifactId>
-        <version>1.5.2</version>
+        <version>1.5.3-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
index ea571c7..d17d13f 100755 (executable)
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.ccsdk.parent</groupId>
                <artifactId>odlparent-lite</artifactId>
-               <version>1.5.2</version>
+               <version>1.5.3-SNAPSHOT</version>
                <relativePath/>
        </parent>
 
index 8778687..78cfc0d 100755 (executable)
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.ccsdk.parent</groupId>
                <artifactId>odlparent-lite</artifactId>
-               <version>1.5.2</version>
+               <version>1.5.3-SNAPSHOT</version>
                <relativePath/>
        </parent>
 
index 441b68f..d11bcda 100755 (executable)
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.ccsdk.parent</groupId>
                <artifactId>odlparent-lite</artifactId>
-               <version>1.5.2</version>
+               <version>1.5.3-SNAPSHOT</version>
                <relativePath/>
        </parent>
 
index 6db7541..b0ad663 100644 (file)
@@ -5,7 +5,7 @@
    <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>1.5.2</version>
+        <version>1.5.3-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
index da0e261..ac3f9d6 100755 (executable)
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>binding-parent</artifactId>
-        <version>1.5.2</version>
+        <version>1.5.3-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
diff --git a/pom.xml b/pom.xml
index b47fa8a..19ddfd3 100755 (executable)
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.ccsdk.parent</groupId>
                <artifactId>odlparent-lite</artifactId>
-               <version>1.5.2</version>
+               <version>1.5.3-SNAPSHOT</version>
                <relativePath/>
        </parent>
 
index 9ae8ae3..e469919 100755 (executable)
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>binding-parent</artifactId>
-        <version>1.5.2</version>
+        <version>1.5.3-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
index 409c550..a872580 100755 (executable)
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.ccsdk.parent</groupId>
                <artifactId>odlparent-lite</artifactId>
-               <version>1.5.2</version>
+               <version>1.5.3-SNAPSHOT</version>
                <relativePath/>
        </parent>
 
index 9fa0be7..e873124 100755 (executable)
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>binding-parent</artifactId>
-        <version>1.5.2</version>
+        <version>1.5.3-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
index d23abaa..5caab4a 100755 (executable)
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>1.5.2</version>
+        <version>1.5.3-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
index 26d05cb..d461a12 100644 (file)
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.ccsdk.parent</groupId>
                <artifactId>binding-parent</artifactId>
-               <version>1.5.2</version>
+               <version>1.5.3-SNAPSHOT</version>
                <relativePath/>
        </parent>
 
index d9bc16e..1d59926 100755 (executable)
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.ccsdk.parent</groupId>
                <artifactId>binding-parent</artifactId>
-               <version>1.5.2</version>
+               <version>1.5.3-SNAPSHOT</version>
                <relativePath/>
        </parent>
 
                <dependency>
                        <groupId>org.opendaylight.controller</groupId>
                        <artifactId>sal-binding-api</artifactId>
+                       <scope>provided</scope>
                </dependency>
         <dependency>
             <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
             <artifactId>rfc6991</artifactId>
-        </dependency>       
+                       <scope>provided</scope>
+        </dependency>
+               <dependency>
+                       <groupId>org.opendaylight.bgpcep</groupId>
+                       <artifactId>bgp-concepts</artifactId>
+                       <version>0.11.1</version>
+                       <scope>provided</scope>
+               </dependency>
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
             <artifactId>sal-core-api</artifactId>
+                       <scope>provided</scope>
         </dependency>
                <!-- Testing Dependencies -->
                <dependency>
index 122c886..d3ab6c3 100755 (executable)
@@ -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.
index e7503cd..f4e0afd 100755 (executable)
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.ccsdk.parent</groupId>
                <artifactId>odlparent-lite</artifactId>
-               <version>1.5.2</version>
+               <version>1.5.3-SNAPSHOT</version>
                <relativePath/>
        </parent>
 
index 38c448d..f79980b 100755 (executable)
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.ccsdk.parent</groupId>
                <artifactId>odlparent-lite</artifactId>
-               <version>1.5.2</version>
+               <version>1.5.3-SNAPSHOT</version>
                <relativePath/>
        </parent>
 
index 0bbdc5c..fad3a35 100755 (executable)
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.ccsdk.parent</groupId>
                <artifactId>binding-parent</artifactId>
-               <version>1.5.2</version>
+               <version>1.5.3-SNAPSHOT</version>
                <relativePath/>
        </parent>
 
index 975c63f..f052a45 100755 (executable)
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.ccsdk.parent</groupId>
                <artifactId>odlparent-lite</artifactId>
-               <version>1.5.2</version>
+               <version>1.5.3-SNAPSHOT</version>
                <relativePath/>
        </parent>
 
index 28aac05..24c33b7 100755 (executable)
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.ccsdk.parent</groupId>
                <artifactId>binding-parent</artifactId>
-               <version>1.5.2</version>
+               <version>1.5.3-SNAPSHOT</version>
                <relativePath/>
        </parent>
 
index eed7a94..2d57fce 100755 (executable)
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.ccsdk.parent</groupId>
                <artifactId>odlparent-lite</artifactId>
-               <version>1.5.2</version>
+               <version>1.5.3-SNAPSHOT</version>
                <relativePath/>
        </parent>
 
index 2ce3d7e..d5b7a18 100755 (executable)
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>binding-parent</artifactId>
-        <version>1.5.2</version>
+        <version>1.5.3-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
index e81362e..1c074a5 100644 (file)
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>spring-boot-starter-parent</artifactId>
-        <version>1.5.2</version>
+        <version>1.5.3-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
index 5212329..8455656 100755 (executable)
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.ccsdk.parent</groupId>
                <artifactId>odlparent-lite</artifactId>
-               <version>1.5.2</version>
+               <version>1.5.3-SNAPSHOT</version>
                <relativePath/>
        </parent>
 
index 628d508..632f428 100755 (executable)
@@ -5,7 +5,7 @@
    <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>1.5.2</version>
+        <version>1.5.3-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
index 9c1b7c1..f631e9e 100644 (file)
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>binding-parent</artifactId>
-        <version>1.5.2</version>
+        <version>1.5.3-SNAPSHOT</version>
         <relativePath/>
     </parent>