@Override protected String ipv6PrefixString(final Ipv6Prefix prefix) { return prefix.getValue(); }
public static Ipv6Prefix getDefaultInstance(String defaultValue) { return new Ipv6Prefix(defaultValue); }
@ConstructorProperties("value") public Ipv6Prefix(java.lang.String _value) { if (_value != null) { check_valueLength(_value); } Preconditions.checkNotNull(_value, "Supplied value may not be null"); for (Pattern p : patterns) { Preconditions.checkArgument(p.matcher(_value).matches(), "Supplied value \"%s\" does not match required pattern \"%s\"", _value, p); } this._value = _value; }
static org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Prefix v6LispPrefixToInetPrefix( final Ipv6Prefix prefix) { return new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Prefix( prefix.getIpv6Prefix().getValue()); }
default Address normalizeIfPrefixBased(Address address){ if(address instanceof Ipv4Prefix){ final String[] parts = ((Ipv4Prefix) address).getIpv4Prefix().getValue().split("/"); return new Ipv4PrefixBuilder().setIpv4Prefix( new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix( prefixValue(parts[0], parts[1]))) .build(); } if (address instanceof Ipv6Prefix){ final String[] parts = ((Ipv6Prefix) address).getIpv6Prefix().getValue().split("/"); return new Ipv6PrefixBuilder().setIpv6Prefix( new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Prefix( prefixValue(parts[0], parts[1]))).build(); } // if not prefix based, does nothing return address; }
@Override protected String ipv6PrefixString(final Ipv6Prefix prefix) { return prefix.getValue(); }
public static Ipv6Prefix getDefaultInstance(String defaultValue) { return new Ipv6Prefix(defaultValue); }
AceIpv6Builder aceIpv6Builder = new AceIpv6Builder(); if (isDirectionIngress) { aceIpv6Builder.setSourceIpv6Network(new Ipv6Prefix( securityRule.getRemoteIpPrefix().getIpv6Prefix().getValue())); } else { aceIpv6Builder.setDestinationIpv6Network(new Ipv6Prefix( securityRule.getRemoteIpPrefix().getIpv6Prefix().getValue()));
@ConstructorProperties("value") public Ipv6Prefix(String _value) { if (_value != null) { check_valueLength(_value); } Objects.requireNonNull(_value, "Supplied value may not be null"); CodeHelpers.checkPattern(_value, patterns, regexes); this._value = _value; }
public IpPrefix(Ipv6Prefix _ipv6Prefix) { super(); this._ipv6Prefix = _ipv6Prefix; this._ipv4Prefix = null; this._value = _ipv6Prefix.getValue().toString().toCharArray(); }
public static Ipv6Prefix getDefaultInstance(String defaultValue) { return new Ipv6Prefix(defaultValue); }
private static Ipv6Prefix createPrefix(final Ipv6Address ipv6Address, final String mask) { if (mask != null && !mask.isEmpty()) { return new Ipv6Prefix(ipv6Address.getValue() + PREFIX_SEPARATOR + mask); } else { return new Ipv6Prefix(ipv6Address.getValue() + PREFIX_SEPARATOR + IPV6_ADDRESS_LENGTH); } }
public static Iterator<String> splitToParts(final Ipv6Prefix ipv6Prefix) { return PREFIX_SPLITTER.split(ipv6Prefix.getValue()).iterator(); }
public Ipv6Prefix ipv6PrefixFromUniqueRouteName(@Nonnull final String uniqueName) { String[] parts = uniqueName.split(UNDERSCORE); return new Ipv6Prefix(coloned(parts[1]) + "/" + parts[2]); }
static Integer parseLength(@Nonnull final Ipv6Prefix prefix) { Matcher matcher = IP_PREFIX_PATTERN.matcher(prefix.getValue()); checkArgument(matcher.matches(), "Could`t parse Locator length: {}", prefix); return Integer.parseInt(matcher.group(GROUP_PREFIX)); }
public static void addMatchDstIpv6(MatchBuilder match, String dstIpStr, int netmask) { addMatchDstIpv6(match, new Ipv6Prefix(dstIpStr + "/" + String.valueOf(netmask))); }
static Ipv6Address parseLocator(@Nonnull final Ipv6Prefix prefix) { Matcher matcher = IP_PREFIX_PATTERN.matcher(prefix.getValue()); checkArgument(matcher.matches(), "Could`t parse Locator: {}", prefix); return new Ipv6Address(matcher.group(GROUP_IP)); } }
public static void addMatchSrcIpv6(MatchBuilder match, String srcIpStr, int netmask) { addMatchSrcIpv6(match, new Ipv6Prefix(srcIpStr + "/" + String.valueOf(netmask))); }
private void initializeIpv6(Ipv6Prefix ipv6Prefix) throws UnknownHostException { if (ipv6Prefix != null) { subNet(ipv6Prefix); this.prefix = ipv6Prefix.getValue(); this.initialized = true; } }