Package onep :: Package interfaces :: Module NetworkPrefix :: Class NetworkPrefix
[frames] | no frames]

Class NetworkPrefix


Class representing the interface prefix that includes the IP address and Prefix length.

Instance Methods
 
__init__(self, address, prefix_length)
Constructor of Network Prefix
 
__str__(self)
str(x)

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Properties
str address
Contains the IP address from the Network Prefix object.
int prefix_length
Contains the Prefix Length of the IP address provided to the Network Prefix class.

Inherited from object: __class__

Method Details

__init__(self, address, prefix_length)
(Constructor)

 

Constructor of Network Prefix

Parameters:
  • address (str) - The IP address from the Network Prefix object.
  • prefix_length (int) - The prefix length of the NetworkPrefix object.
Overrides: object.__init__

__str__(self)
(Informal representation operator)

 

str(x)

Overrides: object.__str__
(inherited documentation)

Property Details

address

Contains the IP address from the Network Prefix object.

Raises: OnepIllegalArgumentException if user tries to set invalid value as IP Address.

Get Method:
_get_address(self)
Set Method:
_set_address(self, addr)
Type:
str

prefix_length

Contains the Prefix Length of the IP address provided to the Network Prefix class.

Get Method:
_get_prefix_length(self)
Set Method:
_set_prefix_length(self, len)
Type:
int