Add utility methods to strip zone from Ipv{4,6}Address 90/86790/1
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 7 Jan 2020 11:25:33 +0000 (12:25 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 7 Jan 2020 13:14:30 +0000 (14:14 +0100)
commitfa174230d80d4abf25ec67a82db4d2cb7b3a8cf9
treed30cc33de0b22d83cf89018ac915bc8a3532d2b8
parent8fddf396866ccf5f629d501639ef5124b1225ea4
Add utility methods to strip zone from Ipv{4,6}Address

Most callers really want to operate of Ipv4AddressNoZone, as a zone
does not make sense. Some amount of translation may be needed when
dealing with models which we have no control over, hence ensuring
no zone is present needs to be done quickly.

This adds ipv4AddressNoZoneFor(Ipv4Address), which does an efficient
check (for the case where the source is already a NoZone) and strips
the zone.

Change-Id: Ieada4625637d0216983b515324bb5d33f5d33a99
JIRA: MDSAL-510
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 6c02ae5ce070dfeeeaae878dc5436c601d305886)
model/ietf/ietf-type-util/src/main/java/org/opendaylight/mdsal/model/ietf/util/AbstractIetfInetUtil.java
model/ietf/rfc6991-ietf-inet-types/src/test/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/ietf/inet/types/rev130715/IetfInetUtilTest.java