Make listen-address support IPv6 54/4854/2
authorRobert Varga <rovarga@cisco.com>
Mon, 27 Jan 2014 09:54:45 +0000 (10:54 +0100)
committerRobert Varga <rovarga@cisco.com>
Mon, 27 Jan 2014 11:37:35 +0000 (12:37 +0100)
Change-Id: I082c9def23720f4beb1c808d9718faadc2036d40
Signed-off-by: Robert Varga <rovarga@cisco.com>
pcep/topology-provider-config/src/main/java/org/opendaylight/controller/config/yang/pcep/topology/provider/PCEPTopologyProviderModule.java
pcep/topology-provider-config/src/main/yang/config-pcep-topology-provider.yang

index 9cfe63b2f7f3fc607c7c40d5e141c1bb636635ee..4606a6a30bac7c411cc37dd5fe7d68d23a42933c 100644 (file)
@@ -59,13 +59,13 @@ public final class PCEPTopologyProviderModule extends org.opendaylight.controlle
        }
 
        private InetAddress listenAddress() {
-               final IpAddress a = new IpAddress(getListenAddress());
+               final IpAddress a = getListenAddress();
                if (a.getIpv4Address() != null) {
                        return InetAddresses.forString(a.getIpv4Address().getValue());
                } else if (a.getIpv6Address() != null) {
                        return InetAddresses.forString(a.getIpv6Address().getValue());
                } else {
-                       throw new IllegalArgumentException("Address " + a + " not supported ");
+                       throw new IllegalArgumentException("Address " + a + " not supported");
                }
        }
 
index a326531f7ecec689f7a181d03ba17fc554502336..af7861f73e8dd62b50bebe7f6eac50c25f686a44 100644 (file)
@@ -93,8 +93,7 @@ module config-pcep-topology-provider {
             }
 
             leaf listen-address {
-                // FIXME: change to inet:ip-address
-                type inet:ipv4-address;
+                type inet:ip-address;
                 default "0.0.0.0";
             }