class documentation

class Subnet(Allocator):

Constructor: Subnet()

View In Hierarchy

A class to represent a subnet in KEA, containing pools of addresses, DHCP options, and other settings

Method __dict__ Return a dictionary representation of the subnet, for making JSON in the format KEA expects
Method __init__ Initialize a subnet object, with empty strings and lists
Method add_relay Add a relay to the list of relays
Method client_class.setter Set the client class
Method fill_from_json Decode a JSON object into a subnet object
Method rapid_commit.setter Set the rapid commit setting
Method rebind_timer.setter Set the renew timer
Method relays.setter Set the relays
Method renew_timer.setter Set the renew timer
Instance Variable calculate_tee_times Calculate tee times. Default is True
Instance Variable client_class Return the client class
Instance Variable client_class_set A client class for the subnet. Mostly a placeholder at this time
Instance Variable id The ID of the subnet. This must be unique on the server, but the only test so far is that it is not negative
Instance Variable interface The interface that can allocate addresses from this subnet
Instance Variable max_preferred_lifetime The maximum preferred lifetime for an address in this subnet
Instance Variable max_valid_lifetime The maximum valid lifetime for an address in this subnet
Instance Variable min_preferred_lifetime The minimum preferred lifetime for an lease in this subnet
Instance Variable min_valid_lifetime The minimum valid lifetime for an address in this subnet
Instance Variable name The name of the subnet
Instance Variable pd_allocator The allocator for the subnet. Like, do the addresses all in a row, or randomize it
Instance Variable pools A list of Pool objects
Instance Variable preferred_lifetime The preferred lifetime of the lease. Default is 0
Instance Variable rapid_commit Return the rapid commit setting
Instance Variable rebind_timer Return the renew timer
Instance Variable renew_timer Return the renew timer
Instance Variable store_extended_info Store extended info about the leases in this subnet
Instance Variable subnet_type The type of subnet, subnet_type.v4, subnet_type.v6, or subnet_type.pd
Instance Variable t1_percent T1 is when renewal should be attempted. Default is 0.5. Should be between 0 and 1
Instance Variable t2_percent T2 is when rebind should be attempted. Default is 0.8. Should be between 0 and 1
Instance Variable valid_lifetime The valid lifetime of the lease. Default is 0
Property relays Return the relays
Instance Variable _client_class_name Undocumented
Instance Variable _client_class_set Undocumented
Instance Variable _rapid_commit Undocumented
Instance Variable _rapid_commit_set Undocumented
Instance Variable _rebind_timer Undocumented
Instance Variable _rebind_timer_set Undocumented
Instance Variable _relays Undocumented
Instance Variable _relays_set Undocumented
Instance Variable _renew_timer Undocumented
Instance Variable _renew_timer_set Undocumented

Inherited from Allocator:

Method add_option_data Add a DHCP Option object to the list of options sent to leases :param option_data: The DHCP Option object to add, DHCPOption with option_usage set to OPTION_IMPLEMENTATION
Method add_option_def Add a DHCP Option object to the list of options sent to leases :param option_def: The DHCP Option object to add, DHCPOption with option_usage set to OPTION_DEFINITION
Method allocator_type.setter Set the allocator type, making sure it's either an AllocatorType enum or a string that matches one of the AllocatorType values
Method calculate_tee_times.setter Set the calculate tee times flag :param calculate_tee_times: A boolean to determine if tee times should be calculated
Method decline_probation_period.setter Set the probation period for declined leases :param decline_probation_period: The probation period in seconds
Method option_data.setter Set the list of DHCP Option objects to be sent to leases :param option_data: A list of DHCP Option objects, DHCPOption with option_usage set to OPTION_IMPLEMENTATION
Method option_defs.setter Set the list of DHCP Option objects that define the options used by leases :param option_defs: A list of DHCP Option objects, DHCPOption with option_usage set to OPTION_DEFINITION
Method parked_packet_limit.setter Set the parked packet limit :param parked_packet_limit: The max number of packets that can be parked
Method preferred_lifetime.setter Set the preferred lifetime of the lease :param preferred_lifetime: The preferred lifetime of the lease in seconds
Method t1_percent.setter Set the T1 percent :param t1_percent: The T1 percent. Should be between 0 and 1
Method t2_percent.setter Set the T2 percent :param t2_percent: The T2 percent. Should be between 0 and 1
Method valid_lifetime.setter Set the valid lifetime of the lease :param valid_lifetime: The valid lifetime of the lease in seconds
Instance Variable allocator_type itterative or randomized. Assign using an AllocatorType enum or string, the object figures it out.
Instance Variable decline_probation_period The probation period for declined leases. Default is 0
Instance Variable option_data A list of DHCP options to be sent with the lease. These contain the settings for the lease
Instance Variable option_defs A list of DHCP options that define the option definitions used by option_data
Instance Variable sets_allocator_type Flag to indicate if the allocator type has been set
Instance Variable sets_decline_probation_period Flag to indicate if the probation period for declined leases has been set
Instance Variable sets_preferred_lifetime Flag to indicate if the preferred lifetime has been set
Instance Variable sets_rebind_timer Flag to indicate if the rebind timer has been set
Instance Variable sets_renew_timer Flag to indicate if the renew timer has been set
Instance Variable sets_t1_percent Flag to indicate if the T1 percent has been set
Instance Variable sets_t2_percent Flag to indicate if the T2 percent has been set
Instance Variable sets_tee_times Flag to indicate if tee times have been set
Instance Variable sets_valid_lifetime Flag to indicate if the valid lifetime has been set
Property parked_packet_limit The max number of packets that can be parked. Default is 0
Instance Variable _allocator_type Undocumented
Instance Variable _calculate_tee_times Undocumented
Instance Variable _decline_probation_period Undocumented
Instance Variable _option_data Undocumented
Instance Variable _option_defs Undocumented
Instance Variable _parked_packet_limit Undocumented
Instance Variable _preferred_lifetime Undocumented
Instance Variable _t1_percent Undocumented
Instance Variable _t2_percent Undocumented
Instance Variable _valid_lifetime Undocumented
def __dict__(self):

Return a dictionary representation of the subnet, for making JSON in the format KEA expects

def __init__(self):

Initialize a subnet object, with empty strings and lists

def add_relay(self, relay):

Add a relay to the list of relays

@client_class.setter
def client_class(self, client_class):

Set the client class

def fill_from_json(self, json_str):

Decode a JSON object into a subnet object

@rapid_commit.setter
def rapid_commit(self, rapid_commit):

Set the rapid commit setting

@rebind_timer.setter
def rebind_timer(self, rebind_timer):

Set the renew timer

@relays.setter
def relays(self, relays):

Set the relays

@renew_timer.setter
def renew_timer(self, renew_timer):

Set the renew timer

calculate_tee_times: bool =

Calculate tee times. Default is True

@property
client_class =

Return the client class

client_class_set: bool =

A client class for the subnet. Mostly a placeholder at this time

id =

The ID of the subnet. This must be unique on the server, but the only test so far is that it is not negative

interface =

The interface that can allocate addresses from this subnet

max_preferred_lifetime =

The maximum preferred lifetime for an address in this subnet

max_valid_lifetime =

The maximum valid lifetime for an address in this subnet

min_preferred_lifetime =

The minimum preferred lifetime for an lease in this subnet

min_valid_lifetime =

The minimum valid lifetime for an address in this subnet

name =

The name of the subnet

pd_allocator =

The allocator for the subnet. Like, do the addresses all in a row, or randomize it

pools: list =

A list of Pool objects

preferred_lifetime =

The preferred lifetime of the lease. Default is 0

@property
rapid_commit =

Return the rapid commit setting

@property
rebind_timer =

Return the renew timer

@property
renew_timer =

Return the renew timer

store_extended_info =

Store extended info about the leases in this subnet

subnet_type =

The type of subnet, subnet_type.v4, subnet_type.v6, or subnet_type.pd

t1_percent =

T1 is when renewal should be attempted. Default is 0.5. Should be between 0 and 1

t2_percent =

T2 is when rebind should be attempted. Default is 0.8. Should be between 0 and 1

valid_lifetime =

The valid lifetime of the lease. Default is 0

@property
relays =

Return the relays

_client_class_name =

Undocumented

_client_class_set: bool =

Undocumented

_rapid_commit =

Undocumented

_rapid_commit_set: bool =

Undocumented

_rebind_timer =
_rebind_timer_set: bool =

Undocumented

_relays =

Undocumented

_relays_set: bool =

Undocumented

_renew_timer =
_renew_timer_set: bool =

Undocumented