--- a/pvl/dns/reverse.py Thu Feb 26 16:14:01 2015 +0200
+++ b/pvl/dns/reverse.py Thu Feb 26 16:17:06 2015 +0200
@@ -89,14 +89,18 @@
def parse_prefix (prefix) :
"""
- Return an ipaddr.IPNetwork from given IPv4/IPv6 prefix.
+ Return an ipaddr.IPNetwork from given filesystem-compatbile IPv4/IPv6 prefix-ish variant.
+
+ Supports partial IPv4 prefixes on octet boundaries.
+ Supports partial IPv6 prefixes on nibble boundaries.
+ Supports IPv4 prefxies using "-" as the prefix separator in place of "/".
>>> parse_prefix('127.0.0.0/8')
IPv4Network('127.0.0.0/8')
>>> parse_prefix('192.0.2.128/26')
IPv4Network('192.0.2.128/26')
>>> parse_prefix('192.0.2.128-26')
- IPv4Network('192.0.2.128-26')
+ IPv4Network('192.0.2.128/26')
>>> parse_prefix('127.')
IPv4Network('127.0.0.0/8')
>>> parse_prefix('10')