netaddr.ip.glob

Package netaddr :: Package ip :: Module glob |
[hide private]
[frames] | no frames]

# Module glob

Routines and classes for supporting and expressing IP address ranges using a glob style syntax.

Classes | [hide private]
| IPGlob Represents an IP address range using a glob-style syntax (x.x.x-y.*).

Functions | [hide private]
valid_glob(ipglob) Returns: `True` if IP range glob is valid, `False` otherwise. |
glob_to_iptuple(ipglob) A function that accepts a glob-style IP range and returns the component lower and upper bound IP address. |
glob_to_iprange(ipglob) A function that accepts a glob-style IP range and returns the equivalent IP range. |
iprange_to_globs(start, end) A function that accepts an arbitrary start and end IP address or subnet and returns one or more glob-style IP ranges. |
glob_to_cidrs(ipglob) A function that accepts a glob-style IP range and returns a list of one or more IP CIDRs that exactly matches it. |
cidr_to_glob(cidr) A function that accepts an IP subnet in a glob-style format and returns a list of CIDR subnets that exactly matches the specified glob. |

Variables | [hide private]
| __package__ = ``'``netaddr.ip``'``

Function Details | [hide private]

### valid_glob(ipglob) |
Parameters: `ipglob` - An IP address range in a glob-style format. Returns: `True` if IP range glob is valid, `False` otherwise.

### glob_to_iptuple(ipglob) |
A function that accepts a glob-style IP range and returns the component lower and upper bound IP address. Parameters: `ipglob` - an IP address range in a glob-style format. Returns: a tuple contain lower and upper bound IP objects.

### glob_to_iprange(ipglob) |
A function that accepts a glob-style IP range and returns the equivalent IP range. Parameters: `ipglob` - an IP address range in a glob-style format. Returns: an IPRange object.

### iprange_to_globs(start, end) |
A function that accepts an arbitrary start and end IP address or subnet and returns one or more glob-style IP ranges. Parameters: `start` - the start IP address or subnet. `end` - the end IP address or subnet. Returns: a list containing one or more IP globs.

### glob_to_cidrs(ipglob) |
A function that accepts a glob-style IP range and returns a list of one or more IP CIDRs that exactly matches it. Parameters: `ipglob` - an IP address range in a glob-style format. Returns: a list of one or more IP objects.

### cidr_to_glob(cidr) |
A function that accepts an IP subnet in a glob-style format and returns a list of CIDR subnets that exactly matches the specified glob. Parameters: `cidr` - an IP object CIDR subnet. Returns: a list of one or more IP addresses and subnets.