diff options
-rwxr-xr-x | sli/provider/pom.xml | 10 | ||||
-rwxr-xr-x | sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelper.java | 16 |
2 files changed, 24 insertions, 2 deletions
diff --git a/sli/provider/pom.xml b/sli/provider/pom.xml index 5dc327f16..056d748f7 100755 --- a/sli/provider/pom.xml +++ b/sli/provider/pom.xml @@ -67,14 +67,22 @@ <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> + <scope>provided</scope> + </dependency> <dependency> <groupId>org.opendaylight.controller</groupId> <artifactId>sal-core-api</artifactId> + <scope>provided</scope> </dependency> <!-- Testing Dependencies --> <dependency> 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 122c8862d..d3ab6c33a 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. |