Skip to content

Commit 8317eb7

Browse files
authored
Merge pull request #1 from sempSONiC2/sempSONiC2-patch-1
Update cli.py
2 parents 553a343 + 868257f commit 8317eb7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

utilities_common/cli.py

+5
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,11 @@ def ipaddress_type(val):
217217

218218
return ip_version.version
219219

220+
def is_ipv4addr_loopback(ipaddr):
221+
if ipaddress.ip_network("127.0.0.0/8", False).overlaps(ipaddress.ip_network(ipaddr, False)):
222+
return True
223+
return False
224+
220225
def is_ip_prefix_in_key(key):
221226
'''
222227
Function to check if IP address is present in the key. If it

0 commit comments

Comments
 (0)