Add utility methods to strip zone from Ipv{4,6}Address 88/86788/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 12:00:32 +0000 (13:00 +0100)
commit6c02ae5ce070dfeeeaae878dc5436c601d305886
tree8f49009ab26ec9073a6141841b69494039954a33
parent63ab71a58966438c528cd8bb88cdf9422ed03304
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>
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