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

Class IPGlob

object --+        
         |        
    BaseIP --+    
             |    
       IPRange --+
                 |
                IPGlob

Represents an IP address range using a glob-style syntax (x.x.x-y.*).

Instance Methods [hide private]
 
__init__(self, ipglob)
Constructor.
 
_get_glob(self)
 
_set_glob(self, ipglob)
 
__str__(self)
Returns: IP glob in common representational format.
 
__repr__(self)
Returns: Python statement to create an equivalent object

Inherited from object: __delattr__, __getattribute__, __new__, __reduce__, __reduce_ex__, __setattr__

    Inherited from IPRange
 
__contains__(self, other)
Returns: True if other falls within the boundary of this one, False otherwise.
 
__getitem__(self, index)
Returns: The IP address(es) in this IPRange object referenced by index or slice.
 
__iter__(self)
Returns: An iterator providing access to all IPAddress objects within range represented by this IPRange object.
 
__len__(self)
Returns: the number of IP addresses in this IPRange.
 
cidrs(self)
The list of CIDR addresses found within the lower and upper bound addresses of this IPRange.
 
key(self)
Returns: A key tuple used to uniquely identify this IPRange.
 
sort_key(self)
Returns: A key tuple used to compare and sort this IPRange correctly.
    Inherited from BaseIP
 
__eq__(self, other)
Returns: True if this IPAddress or IPNetwork object is equivalent to other, False otherwise.
 
__ge__(self, other)
Returns: True if this IPAddress or IPNetwork object is greater than or equal to other, False otherwise.
 
__gt__(self, other)
Returns: True if this IPAddress or IPNetwork object is greater than other, False otherwise.
 
__hash__(self)
Returns: A hash value uniquely indentifying this IP object.
 
__le__(self, other)
Returns: True if this IPAddress or IPNetwork object is less than or equal to other, False otherwise.
 
__lt__(self, other)
Returns: True if this IPAddress or IPNetwork object is less than other, False otherwise.
 
__ne__(self, other)
Returns: True if this IPAddress or IPNetwork object is not equivalent to other, False otherwise.
 
is_ipv4_compat(self)
Returns: True if this IP is IPv4-mapped IPv6 address, False otherwise.
 
is_ipv4_mapped(self)
Returns: True if this IP is IPv4-compatible IPv6 address, False otherwise.
 
is_link_local(self)
Returns: True if this IP is link-local address False otherwise.
 
is_loopback(self)
Returns: True if this IP is loopback address (not for network transmission), False otherwise.
 
is_multicast(self)
Returns: True if this IP is multicast, False otherwise
 
is_private(self)
Returns: True if this IP is for internal/private use only (i.e.
 
is_reserved(self)
Returns: True if this IP is in IANA reserved range, False otherwise.
 
is_unicast(self)
Returns: True if this IP is unicast, False otherwise
Properties [hide private]
  glob
an arbitrary IP address range in glob format.

Inherited from object: __class__

    Inherited from IPRange
  first
The integer value of first IP address in this IPRange object.
  last
The integer value of last IP address in this IPRange object.
  size
The number of IP addresses within this IPRange.
    Inherited from BaseIP
  info
A record dict containing IANA registration details for this IP address if available, None otherwise.
  version
the IP protocol version represented by this IP object.
Method Details [hide private]

__init__(self, ipglob)
(Constructor)

 

Constructor.

Parameters:
  • start - an IPv4 or IPv6 address that forms the lower boundary of this IP range.
  • end - an IPv4 or IPv6 address that forms the upper boundary of this IP range.
Overrides: object.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

 

str(x)

Returns:
IP glob in common representational format.
Overrides: object.__str__

__repr__(self)
(Representation operator)

 

repr(x)

Returns:
Python statement to create an equivalent object
Overrides: object.__repr__

Property Details [hide private]

glob

an arbitrary IP address range in glob format.

Get Method:
_get_glob(self)
Set Method:
_set_glob(self, ipglob)