/** * Constructor provided only for using in JMX. Don't use it for * construction new object of this union type. */ @ConstructorProperties("value") public IpAddress(char[] _value) { java.lang.String defVal = new java.lang.String(_value); IpAddress defInst = IpAddressBuilder.getDefaultInstance(defVal); this._ipv4Address = defInst._ipv4Address; this._ipv6Address = defInst._ipv6Address; this._value = _value == null ? null : _value.clone(); } /**
private static SimpleAddress tryIpAddress(String defaultValue) { try { SimpleAddress address = new SimpleAddress(IpAddressBuilder.getDefaultInstance(defaultValue)); return address; } catch (IllegalArgumentException e) { return null; } }
/** * Constructor provided only for using in JMX. Don't use it for * construction new object of this union type. */ @ConstructorProperties("value") public IpAddress(char[] _value) { java.lang.String defVal = new java.lang.String(_value); IpAddress defInst = IpAddressBuilder.getDefaultInstance(defVal); this._ipv4Address = defInst._ipv4Address; this._ipv6Address = defInst._ipv6Address; this._value = _value == null ? null : _value.clone(); } /**
public String getRemoteNextHopPointer(BigInteger remoteDpnId, long vpnId, String prefixIp, String nextHopIp) { String tunnelIfName = null; LOG.trace("getRemoteNextHopPointer: input [remoteDpnId {}, vpnId {}, prefixIp {}, nextHopIp {} ]", remoteDpnId, vpnId, prefixIp, nextHopIp); if (nextHopIp != null && !nextHopIp.isEmpty()) { try{ // here use the config for tunnel type param tunnelIfName = getTunnelInterfaceName(remoteDpnId, org.opendaylight.yang.gen.v1.urn.ietf.params.xml .ns.yang.ietf.inet.types.rev130715.IpAddressBuilder.getDefaultInstance(nextHopIp)); } catch(Exception ex){ LOG.error("Error while retrieving nexthop pointer for nexthop {} : ", nextHopIp, ex.getMessage()); } } return tunnelIfName; }
static IpAddress extractIp(final DataContainerNode<? extends PathArgument> evpn) { if (evpn.getChild(IP_NID).isPresent()) { return IpAddressBuilder.getDefaultInstance((String) evpn.getChild(IP_NID).get().getValue()); } return null; }
static IpAddress extractOrigRouteIp(final DataContainerNode<? extends PathArgument> evpn) { return IpAddressBuilder.getDefaultInstance((String) evpn.getChild(ORI_NID).get().getValue()); }
public static IpPrefixOrAddress getDefaultInstance(String defaultValue) { try { IpPrefix ipPrefix = IpPrefixBuilder.getDefaultInstance(defaultValue); return new IpPrefixOrAddress(ipPrefix); } catch (IllegalArgumentException e) { LOG.debug("{} is not of IpPrefix type; checking whether it's a IpAddress type", defaultValue); IpAddress ipAddress = IpAddressBuilder.getDefaultInstance(defaultValue); return new IpPrefixOrAddress(ipAddress); } } }
@Override protected RestconfProviderImpl create() { final RestconfProviderImpl instance = new RestconfProviderImpl(statsServiceWrapper, IpAddressBuilder.getDefaultInstance(cfg.restconfWebsocketAddress.get()), new PortNumber(cfg.restconfWebsocketPort.get())); // Required to properly initialize restconf (broker, schema ctx, etc.). // Without that restconf would fail with 503 (service not available). instance.start(); shutdownHandler.register(instance.getClass().getCanonicalName(), instance); return instance; } }
private void processIpv4AddressRanges(final SpdEntriesBuilder builder, final IpsecSpdDetails details) { if (details.localStartAddr != null && details.localStartAddr.length > 0) { builder.setLaddrStart(IpAddressBuilder.getDefaultInstance( new IpAddressNoZone(arrayToIpv4AddressNoZone(details.localStartAddr)).stringValue())); } if (details.localStopAddr != null && details.localStopAddr.length > 0) { builder.setLaddrStop(IpAddressBuilder.getDefaultInstance( new IpAddressNoZone(arrayToIpv4AddressNoZone(details.localStopAddr)).stringValue())); } if (details.remoteStartAddr != null && details.remoteStartAddr.length > 0) { builder.setRaddrStart(IpAddressBuilder.getDefaultInstance( new IpAddressNoZone(arrayToIpv4AddressNoZone(details.remoteStartAddr)).stringValue())); } if (details.remoteStopAddr != null && details.remoteStopAddr.length > 0) { builder.setRaddrStop(IpAddressBuilder.getDefaultInstance( new IpAddressNoZone(arrayToIpv4AddressNoZone(details.remoteStopAddr)).stringValue())); } }
private void processIpv6AddressRanges(final SpdEntriesBuilder builder, final IpsecSpdDetails details) { if (details.localStartAddr != null && details.localStartAddr.length > 0) { builder.setLaddrStart(IpAddressBuilder.getDefaultInstance( new IpAddressNoZone(arrayToIpv6AddressNoZone(details.localStartAddr)).stringValue())); } if (details.localStopAddr != null && details.localStopAddr.length > 0) { builder.setLaddrStop(IpAddressBuilder.getDefaultInstance( new IpAddressNoZone(arrayToIpv6AddressNoZone(details.localStopAddr)).stringValue())); } if (details.remoteStartAddr != null && details.remoteStartAddr.length > 0) { builder.setRaddrStart(IpAddressBuilder.getDefaultInstance( new IpAddressNoZone(arrayToIpv6AddressNoZone(details.remoteStartAddr)).stringValue())); } if (details.remoteStopAddr != null && details.remoteStopAddr.length > 0) { builder.setRaddrStop(IpAddressBuilder.getDefaultInstance( new IpAddressNoZone(arrayToIpv6AddressNoZone(details.remoteStopAddr)).stringValue())); } }
final LocalPeerPreferences pref = new LocalPeerPreferences(); final InetSocketAddress isa = (InetSocketAddress) channel.remoteAddress(); pref.setHost(IpAddressBuilder.getDefaultInstance(isa.getAddress().getHostAddress())); pref.setPort(new PortNumber(isa.getPort())); pref.setBgpId(new BgpId(remoteOpen.getBgpIdentifier()));
final IpAddress extrenalAddress = IpAddressBuilder.getDefaultInstance(externalIp); final IpAddress internalAddress = IpAddressBuilder.getDefaultInstance(internalIp); Port neutronPortForIp = NatUtil.getNeutronPortForIp(dataBroker,internalAddress, NeutronConstants.DEVICE_OWNER_NEUTRON_PORT);
final RemotePeerPreferences pref = new RemotePeerPreferences(); final InetSocketAddress isa = (InetSocketAddress) channel.localAddress(); pref.setHost(IpAddressBuilder.getDefaultInstance(isa.getAddress().getHostAddress())); pref.setPort(new PortNumber(isa.getPort())); final List<AdvertizedTableTypes> tt = new ArrayList<>();
this.synced = isSynchronized(); pccBuilder.setIpAddress(IpAddressBuilder.getDefaultInstance(peerAddress.getHostAddress())); final InstanceIdentifier<Node1> topologyAugment = state.getNodeId().augmentation(Node1.class); this.pccIdentifier = topologyAugment.child(PathComputationClient.class);