Code Review
/
csit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Add tests for Honeycomb L2 FIB support
[csit.git]
/
resources
/
libraries
/
python
/
IPUtil.py
diff --git
a/resources/libraries/python/IPUtil.py
b/resources/libraries/python/IPUtil.py
index
4b6e276
..
e364e60
100644
(file)
--- a/
resources/libraries/python/IPUtil.py
+++ b/
resources/libraries/python/IPUtil.py
@@
-56,9
+56,9
@@
def convert_ipv4_netmask_prefix(network):
net = IPv4Network(u"{0}/{1}".format(temp_address, network), False)
if isinstance(network, int) and (0 < network < 33):
net = IPv4Network(u"{0}/{1}".format(temp_address, network), False)
if isinstance(network, int) and (0 < network < 33):
- return
net.netmask
+ return
str(net.netmask)
elif isinstance(network, basestring):
elif isinstance(network, basestring):
- return
net.prefixlen
+ return
int(net.prefixlen)
else:
raise Exception("Value {0} is not a valid ipv4 netmask or network"
" prefix length".format(network))
else:
raise Exception("Value {0} is not a valid ipv4 netmask or network"
" prefix length".format(network))