Infoblox::DHCP::HostAddr - DHCP Host Address object.
A Host Address is an object used to specify addresses in a DNS Host object.
my $host_addr = Infoblox::DHCP::HostAddr -> new( ipv4addr => $ipv4addr, #Required bootfile => $filename, #Optional / Default is undefined bootserver => $ipv4addr | $fqdn, #Optional / Default is undefined configure_for_dhcp => "true" | "false", #Optional / Default is "false" deny_bootp => "true" | "false", #Optional / Default is "false" dhcp_client_identifier => $string, #Optional / Default is empty enable_pxe_lease_time => "true" | "false", #Optional / Default is "false" ignore_client_requested_options => "true" | "false", #Optional / Default is "false" mac => $mac_addr, #Optional / Default is empty match_client => $string, #Optional / Default is "MAC" #Possible values are: # "MAC","CLIENT_IDENTIFIER","RESERVED", # "CIRCUIT_ID", "REMOTE_ID" nextserver => $ipv4addr | $fqdn | undef, #Optional / Default is undefined options => [$option1, $option2, ...] #Optional / Default is empty override_bootfile => "true" | "false", #Optional / Default is "false" override_bootserver => "true" | "false", #Optional / Default is "false" override_deny_bootp => "true" | "false", #Optional / Default is "false" override_ignore_client_requested_options => "true" | "false", #Optional / Default is "false" override_nextserver => "true" | "false", #Optional / Default is "false" override_options => "true" | "false", #Optional / Default is "false" override_pxe_lease_time => "true" | "false", #Optional / Default is "false" pxe_lease_time => $time, #Optional / Default is empty use_for_ea_inheritance => "true" | "false", #Optional / Default is "false" reserved_interface => $interface, #Optional logic_filters => [ $filter_name | $filter_obj, ...], # Optional / Default is undefined override_logic_filters => "true' | 'false", # Optional / Default value is "false" );
This section describes all the methods in Infoblox::Session module that you can apply to a DHCP Host Address object.
Use this function to specify the addresses associated with the Host record. See Infoblox::DNS::Host->ipv4addrs() for parameters and return values.
#Construct a Host Address object my $h1 = Infoblox::DHCP::HostAddr->new( ipv4addr => "10.0.0.1" );
# Configure an address in the Host record object $host->ipv4addrs([$h1]);
Use this method to retrieve all the matching objects from the Infoblox appliance. See Infoblox::Session->get() for parameters and return values.
'discover_now_status' will not be returned by default, use 'return_methods' to request it if needed.
Apply the following attributes to get a specific DHCP Host Address object:
ipv4addr - Optional. IPV4 address of the host address. mac - Optional. MAC address of the host address. host - Optional, the name of the host to which this address belongs.
discovered_mac - Optional. Discovered MAC address. discovered_name - Optional. Discovered name. discoverer - Optional. Discoverer name. first_discovered - Optional. Time of the first discovery. last_discovered - Optional. Time of the last discovery. netbios - Optional. Discovered NetBIOS name. network_component_description - Optional. Discovered network component description. network_component_ip - Optional. Discovered network component IP address. network_component_name - Optional. Discovered network component name. network_component_port_description - Optional. Discovered network component port description. network_component_port_name - Optional. Discovered network component port name. network_component_port_number - Optional. Discovered network component port number. network_component_type - Optional. Discovered network component type. os - Optional. Discovered OS. port_duplex - Optional. Discovered port duplex settings. port_link_status - Optional. Discovered port link status. port_speed - Optional. Discovered port speed settings. port_status - Optional. Discovered port status settings. port_vlan_description - Optional. Discovered port VLAN description. port_vlan_name - Optional. Discovered port VLAN name. port_vlan_number - Optional. Discovered port VLAN number. v_cluster - Optional. Discovered VMware cluster name. v_datacenter - Optional. Discovered VMware datacenter name. v_host - Optional. Discovered VMware server name. v_name - Optional. Discovered VMware host or virtual machine name. v_netadapter - Optional. Discovered VMware physical network adapter name. v_switch - Optional. Discovered VMware virtual switch name. v_type - Optional. Discovered VMware entity type (possible values: "VirtualMachine", "HostSystem", "VirtualCenter").
#Get DHCP Host Address object through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::HostAddr", mac => "11:11:11:11:11.11", );
# get HostAddr by v_type: my @retrieved_objs = $session->get( object => 'Infoblox::DHCP::HostAddr', v_type => 'VirtualMachine');
Use this method to modify a DHCP Host Address object in the Infoblox appliance. See Infoblox::Session->modify() for parameters and return values.
#Use method to modify the pxe_lease_time $host_address->pxe_lease_time("1234"); #Submit modification my $response = $session->modify( $host_address );
Use this method to search for DHCP Host Address object. See Infoblox::Session->search() for parameters and return values.
'discover_now_status' will not be returned by default, use 'return_methods' to request it if needed.
Apply the following attributes to search for a specific DHCP Host Address object:
ipv4addr - Optional. IPV4 address of the host address (regular expression). mac - Optional. MAC address of the host address (regular expression). host - Optional, the name of the host to which this address belongs (regular expression).
discovered_mac - Optional. Discovered MAC address. discovered_name - Optional. Discovered name (regular expression). discoverer - Optional. Discoverer name (regular expression). first_discovered - Optional. Time of the first discovery. last_discovered - Optional. Time of the last discovery. netbios - Optional. Discovered NetBIOS name (regular expression). network_component_description - Optional. Discovered network component description (regular expression). network_component_ip - Optional. Discovered network component IP address (regular expression). network_component_name - Optional. Discovered network component name (regular expression). network_component_port_description - Optional. Discovered network component port description (regular expression). network_component_port_name - Optional. Discovered network component port name (regular expression). network_component_port_number - Optional. Discovered network component port number. network_component_type - Optional. Discovered network component type (regular expression). os - Optional. Discovered OS (regular expression). port_duplex - Optional. Discovered port duplex settings. port_link_status - Optional. Discovered port link status. port_speed - Optional. Discovered port speed settings. port_status - Optional. Discovered port status settings. port_vlan_description - Optional. Discovered port VLAN description (regular expression). port_vlan_name - Optional. Discovered port VLAN name (regular expression). port_vlan_number - Optional. Discovered port VLAN number. v_cluster - Optional. Discovered VMware cluster name (regular expression). v_datacenter - Optional. Discovered VMware datacenter name (regular expression). v_host - Optional. Discovered VMware server name (regular expression). v_name - Optional. Discovered VMware host or virtual machine name (regular expression). v_netadapter - Optional. Discovered VMware physical network adapter name (regular expression). v_switch - Optional. Discovered VMware virtual switch name (regular expression). v_type - Optional. Discovered VMware entity type (possible values: "VirtualMachine", "HostSystem", "VirtualCenter").
# Search DHCP Host Address object through the session my @retrieved_objs = $session->search( object => "Infoblox::DHCP::HostAddr", mac => "11:11:11:11:11.*", );
# search HostAddr by v_datacenter: my @retrieved_objs = $session->search( object => 'Infoblox::DHCP::HostAddr', v_datacenter => 'test.*');
This section describes all the methods that you can use to set and retrieve the attribute values of a DHCP Host Address object.
Use this method to set or retrieve the bootfile value of a DHCP Host Address object.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Note that when bootfile is set to a defined value and override_bootfile is set to "false", the last operation takes precedence. Thus the sequence $object->bootfile("boot_file"); $object->override_bootfile("false"); will set override_bootfile to "false", and the sequence $object->override_bootfile("false"); $object->bootfile("boot_file"); will set override_bootfile to "true".
The name of the file that the client must download. The default value is undefined.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get bootfile my $bootfile = $host_addr->bootfile(); #Modify bootfile $host_addr->bootfile("boot_file");
Use this method to set or retrieve the bootserver of a DHCP Host Address object.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Note that when bootserver is set to a defined value and override_bootserver is set to "false", the last operation takes precedence. Thus the sequence $object->bootserver("bootserver2.com"); $object->override_bootserver("false"); will set override_bootserver to "false", and the sequence $object->override_bootserver("false"); $object->bootserver("bootserver2.com"); will set override_bootserver to "true".
The boot server IP address or FQDN (Fully Qualified Domain Name). The FQDN consists of the host name followed by the domain name (example: abc.com). A boot server name can have a maximum of 256 bytes. The default value is undefined.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get bootserver my $bootserver = $host_addr->bootserver(); #Modify bootserver $host_addr->bootserver("bootserver2.com"); #Un-override bootserver $host_addr->bootserver(undef);
Use this method to set or retrieve the configure_for_dhcp flag of a DHCP Host Address object.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Specify "true" to set the configure_for_dhcp flag or "false" to deactivate/unset it. The default value is "false".
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get configure_for_dhcp my $configure_for_dhcp = $host_addr->configure_for_dhcp(); #Modify configure_for_dhcp $host_addr->configure_for_dhcp("true");
Use this method to set or retrieve the deny_bootp flag of a DHCP Host Address object.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Note that when deny_bootp is set to a defined value and override_deny_bootp is set to "false", the last operation takes precedence. Thus the sequence $object->deny_bootp("true"); $object->override_deny_bootp("false"); will set override_deny_bootp to "false", and the sequence $object->override_deny_bootp("false"); $object->deny_bootp("true"); will result in override_deny_bootp="true".
Specify "true" to set the deny_bootp flag or "false" to deactivate/unset it. The default value is undefined, which indicates that this attribute inherits the upper-level setting.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get deny_bootp my $deny_bootp = $host_addr->deny_bootp(); #Modify deny_bootp $host_addr->deny_bootp("true");
Use this method to retrieve the discovered data of a DHCP Host Address object. This is a read-only attribute.
Omit the parameter to retrieve the attribute value.
None
The valid return value is an Infoblox::Grid::Discovery::Data object.
#Get discovered_data value my $discovered_data = $object->discovered_data();
Use this method to retrieve the discovered MAC address of a DHCP Host Address object.
none
The method returns the discovered MAC address.
#Get discovered_mac my $discovered_mac = $host_addr->discovered_mac();
Use this method to retrieve the discovered name of a DHCP Host Address object.
none
The method returns the discovered name.
#Get discovered_name my $discovered_name = $host_addr->discovered_name();
Use this method to retrieve the discoverer of a DHCP Host Address object.
none
The method returns the discoverer value.
#Get discoverer my $discoverer = $host_addr->discoverer();
Use this method to retrieve the current discovery status. This attribute is read-only.
'discover_now_status' will not be returned by default, use 'return_methods' to request it if needed.
None.
The method returns the attribute value that can be 'COMPLETE', 'FAILED', 'NONE', 'PENDING' or 'RUNNING'.
#Get discover_now_status my $discover_now_status = $host_addr->discover_now_status();
Use this method to set or retrieve the enable_pxe_lease_time flag of a DHCP Host Address object.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Specify "true" to set the enable_pxe_lease_time flag or "false" to deactivate/unset it. The default value is "false".
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get enable_pxe_lease_time my $enable_pxe_lease_time = $host_addr->enable_pxe_lease_time(); #Modify enable_pxe_lease_time $host_addr->enable_pxe_lease_time("true");
Use this method to retrieve the date and time that the DHCP Host Address object was first discovered.
none
The method returns the date and time that the DHCP Host Address object was first discovered.
#Get first_discovered my $first_discovered = $host_addr->first_discovered();
Use this method to retrieve the name of the Host record this address belongs to.
none
The method returns the host value.
#Get host my $host = $host_addr->host();
Use this method to set or retrieve the ignore_client_requested_option flag of a DHCP Host address object. If this flag is set to false, all the defined DHCP options are returned to the client.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Note that when ignore_client_requested_options is set to a defined value and override_ignore_client_requested_options is set to "false", the last operation takes precedence. Thus the sequence $object->ignore_client_requested_options("true"); $object->override_ignore_client_requested_options("false"); will set override_ignore_client_requested_options to "false", and the sequence $object->override_ignore_client_requested_options("false"); $object->ignore_client_requested_options("true"); will set override_ignore_client_requested_options to "true".
Specify "true" to set the ignore_client_requested_option flag or "false" to deactivate/unset it. The default value is false, which indicates that this attribute inherits the member-level setting.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
# Get ignore_client_requested_option my $ignore_client_requested_option = $host_addr->ignore_client_requested_options(); # Un-override ignore_client_requested_option $host_addr->ignore_client_requested_options(undef); # Modify ignore_client_requested_option $host_addr->ignore_client_requested_options("true");
Use this method to set or retrieve the ipv4addr value of a DHCP Host Address object.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
An IPv4 address is a 32-bit number in dotted decimal notation. It consists of four 8-bit groups of decimal digits separated by decimal points (example: 192.168.1.2).
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get ipv4addr my $ipv4addr = $host_addr->ipv4addr(); #Modify ipv4addr $host_addr->ipv4addr("10.0.0.5");
Use this method to retrieve the flag used to indicate whether an invalid MAC address is used. This is a read-only attribute.
None
The method returns the attribute value.
#Get is_invalid_mac value my $is_invalid_mac = $host_addr->is_invalid_mac();
Use this method to retrieve the time this object was last seen by a discovery job.
The default value for this field is empty.
N/A
The method returns the attribute value.
#Get last_discovered my $last_discovered = $host_addr->last_discovered();
Use this method to retrieve the time when the associated record was last queried. This is a read-only attribute.
None
The method returns the attribute value. The number of seconds that have elapsed since January 1st, 1970 UTC.
#Get last_queried my $last_queried = $host_addr->last_queried();
Use this method to set or retrieve all the logic (ordered) filters associated with the DHCP Host Address.
Filters are used to screen address assignments for the DHCP Host Address if the addresses are to be assigned to specific hosts.
Setting this method to a defined value implicitly sets the override_logic_filters method to "true". Setting the parameter to undefined causes the appliance to use the grid default and automatically resets the override_logic_filters attribute to "false".
Note that when logic_filters is set to a defined value and override_dlogic_filters is set to "false", the last operation takes precedence. Thus the sequence $object->logic_filters($filters); $object->override_logic_filters("false"); will set override_logic_filters to "false", and the sequence $object->override_logic_filters("false"); $object->logic_filters($filters); will result in override_logic_filters="true".
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
The valid value is an array reference that contains either the Infoblox::DHCP::Filter::MAC, Infoblox::DHCP::Filter::NAC, Infoblox::DHCP::Filter::Option objects or the names of the corresponding filters. The filters in the list must satisfy the following conditions:
The default value of the parameter is undefined.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get logic_filters my $ref_logic_filters = $host_addr->logic_filters(); #Modify logic_filters $host_addr->logic_filters(["filter_1","filter_2",$exl1]); #$exl1 is an Infoblox::DHCP::Filter::MAC, Infoblox::DHCP::Filter::NAC or Infoblox::DHCP::Filter::Option object.
Use this method to set or retrieve the MAC address value of a DHCP Host Address object.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
MAC Address of the DHCP Host address object. The format for MAC addresses and vendor prefixes are hexadecimal strings separated by colons or dashes. The following formats are acceptable: 11:11:11:11:11:11 and 11-11-11-11-11-11.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get mac my $mac = $host_addr->mac(); #Modify mac $host_addr->mac("11::11::11::11::11::12");
Use this method to set or retrieve the match_client value of a DHCP Host Address object.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
match_client "MAC": The fixed IP address is leased to the matching MAC address.
match_client "CLIENT_IDENTIFIER": The fixed IP address is leased to the matching DHCP client identifier
match_client "RESERVED": The fixed IP address is reserved for later use with a MAC address that only has zeros.
match_client "CIRCUIT_ID": The fixed IP address is leased to the DHCP client with a matching circuit ID. Note that the "agent_circuit_id" field must be set in this case.
match_client "REMOTE_ID": The fixed IP address is leased to the DHCP client with a matching remote ID. Note that the "agent_remote_id" field must be set in this case.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get match_client my $match_client = $host_addr->match_client(); #Modify match_client $host_addr->match_client("CLIENT_IDENTIFIER");
Use this method to retrieve Microsoft Active Directory users related information. This is a read-only attribute.
None
The valid return value is an Infoblox::Grid::MSServer::AdUser::Data object.
#Get ms_ad_user_data value my $value = $object->ms_ad_user_data();
Use this method to retrieve the name in the NetBIOS reply that responded to a NetBIOS query.
The method returns the attribute value.
#Get netbios my $netbios = $host_addr->netbios();
Use this method to retrieve the network value of a DHCP Host Address object. This is a read-only attribute.
Omit the parameter to retrieve the attribute value.
None
The method returns the attribute value.
#Get network my $network = $host_addr->network();
Use this method to retrieve the description of the network device that is connected to the DHCP Host Address object.
none
The method returns the network device description.
#Get network_component_description my $network_component_description = $host_addr->network_component_description();
Use this method to retrieve the IP address of the network device that is connected to the DHCP Host Address object.
none
The method returns the IP address of the network device.
#Get network_component_ip my $network_component_ip = $host_addr->network_component_ip();
Use this method to retrieve the name of the network device that is connected to the DHCP Host Address object.
none
The method returns the network device name.
#Get network_component_name my $network_component_name = $host_addr->network_component_name();
Use this method to retrieve the description of the network device port that is connected to the DHCP Host Address object.
none
The method returns the description of the port on the network device.
#Get network_component_port_description my $network_component_port_description = $host_addr->network_component_port_description();
Use this method to retrieve the name of the network device port that is connected to the DHCP Host Address object.
none
The method returns the name of the port on the network device.
#Get network_component_port_name my $network_component_port_name = $host_addr->network_component_port_name();
Use this method to retrieve the number of the network device port that is connected to the DHCP Host Address object.
none
The method returns the network device port number.
#Get network_component_port_number my $network_component_port_number = $host_addr->network_component_port_number();
Use this method to retrieve the type of the network device that is connected to DHCP Host Address object.
none
The method returns the network device type.
#Get network_component_type my $network_component_type = $host_addr->network_component_type();
Use this method to set or retrieve the nextserver value of a DHCP Host Address object.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Note that when nextserver is set to a defined value and override_nextserver is set to "false", the last operation takes precedence. Thus the sequence $object->nextserver("3.3.3.4"); $object->override_nextserver("false"); will set override_nextserver to "false", and the sequence $object->override_nextserver("false"); $object->nextserver("3.3.3.4"); will set override_nextserver to "true".
The next server IP address or FQDN (Fully Qualified Domain Name). The FQDN consists of the host name followed by the domain name (example: abc.com). A next server name can have a maximum of 256 bytes. The default value is undefined.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get nextserver my $nextserver = $host_addr->nextserver(); #Modify nextserver $host_addr->nextserver("3.3.3.4"); #Un-override nextserver $host_addr->nextserver(undef);
Use this method to set or retrieve the options of a DHCP Host Address object.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
See Infoblox::DHCP::Option for parameters and methods available for this object.
Note that when options is set to a defined value and override_options is set to "false", the last operation takes precedence. Thus the sequence $object->options([$o1,$o2]); $object->override_options("false"); will set override_options to "false", and the sequence $object->override_options("false"); $object->options([$o1,$o2]); will set override_options to "true".
Options describe network configuration settings and various services available on the network. These options occur as variable-length fields at the end of DHCP messages.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get options my $options = $host_addr->options(); #Modify options $host_addr->options([$option1, $option2]);
Use this method to retrieve the operating system associated with this host address.
The method returns the attribute value.
#Get os my $os = $host_addr->os();
The override_bootfile attribute controls whether the bootfile value in the member is used, instead of the grid default.
The override_bootfile attribute can be specified explicitly. It is also set implicitly when bootfile is set to a defined value.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Specify "true" to set the override_bootfile flag or "false" to deactivate/unset it. The default value is "false".
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get override_bootfile my $override = $host_addr->override_bootfile(); #Modify the override $host_addr->override_bootfile("true");
The override_bootserver attribute controls whether the bootserver value in the member is used, instead of the grid default.
The override_bootserver attribute can be specified explicitly. It is also set implicitly when bootserver is set to a defined value.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Specify "true" to set the override_bootserver flag or "false" to deactivate/unset it. The default value is "false".
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get override_bootserver my $override = $host_addr->override_bootserver(); #Modify the override $host_addr->override_bootserver("true");
The override_deny_bootp attribute controls whether the deny_bootp value in the member is used, instead of the grid default.
The override_deny_bootp attribute can be specified explicitly. It is also set implicitly when deny_bootp is set to a defined value.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Specify "true" to set the override_deny_bootp flag or "false" to deactivate/unset it. The default value is "false".
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get override_deny_bootp my $override = $host_addr->override_deny_bootp(); #Modify the override $host_addr->override_deny_bootp("true");
The override_ignore_client_requested_option attribute controls whether the ignore_client_requested_option value in the member is used, instead of the grid default.
The override_ignore_client_requested_option attribute can be specified explicitly. It is also set implicitly when ignore_client_requested_option is set to a defined value.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Specify "true" to set the override_ignore_client_requested_option flag or "false" to deactivate/unset it. The default value is "false".
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get override_ignore_client_requested_option my $override = $host_addr->override_ignore_client_requested_option(); #Modify the override $host_addr->override_ignore_client_requested_option("true");
The override_logic_filters attribute controls whether the logic_filters value of the DHCP Host Address is used, instead of the Grid default.
The override_logic_filters attribute can be specified explicitly. It is also set implicitly when logic_filters is set to a defined value.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Set the parameter to "true" to override the Grid-level setting for logic_filters. Set the parameter to "false" to inherit the Grid-level setting for logic_filters.
The default value of this parameter is "false".
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Getting override_logic_filters my $override_logic_filters=$host_addr->override_logic_filters( ); #Modifying override_logic_filters $host_addr->override_logic_filters("true");
The override_nextserver attribute controls whether the nextserver value in the member is used, instead of the grid default.
The override_nextserver attribute can be specified explicitly. It is also set implicitly when nextserver is set to a defined value.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Specify "true" to set the override_nextserver flag or "false" to deactivate/unset it. The default value is "false".
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get override_nextserver my $override = $host_addr->override_nextserver(); #Modify the override $host_addr->override_nextserver("true");
The override_options attribute controls whether the options value in the member is used, instead of the upper-level default.
The override_options attribute can be specified explicitly. It is also set implicitly when options is set to a defined value.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Specify "true" to set the override_options flag or "false" to deactivate/unset it. The default value is "false".
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get override_options my $override = $host_addr->override_options(); #Modify the override $host_addr->override_options("true");
The override_pxe_lease_time attribute controls whether the pxe_lease_time value in the member is used, instead of the grid default.
The override_pxe_lease_time attribute can be specified explicitly. It is also set implicitly when pxe_lease_time is set to a defined value.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Specify "true" to set the override_pxe_lease_time flag or "false" to deactivate/unset it. The default value is "false".
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get override_pxe_lease_time my $override = $host_addr->override_pxe_lease_time(); #Modify the override $host_addr->override_pxe_lease_time("true");
Use this method to retrieve the duplex setting of the network device port that is connected to the DHCP Host Address object.
none
The method returns the port duplex setting. The returned value, if any, is one of the following:
Full Half
#Get port_duplex my $port_duplex = $host_addr->port_duplex();
Use this method to retrieve the link status of the network device port that is connected to the DHCP Host Address object.
none
The method returns the network device port link status. The returned value, if any, is one of the following:
Connected Not Connected Unknown
#Get port_link_status my $port_link_status = $host_addr->port_link_status();
Use this method to retrieve the speed of the network device port that is connected to the DHCP Host Address object.
none
The method returns the network device port speed. The returned value, if any, is one of the following:
10M 100M 1G 10G 100G Unknown
#Get port_speed my $port_speed = $host_addr->port_speed();
Use this method to retrieve the status of the network device port that is connected to the DHCP Host Address object.
none
The method returns the network device port status. The returned value, if any, is one of the following:
Up Down Unknown
#Get port_status my $port_status = $host_addr->port_status();
Use this method to retrieve the VLAN description of the network device port that is connected to the DHCP Host Address object.
none
The method returns the VLAN description of the network device port.
#Get port_vlan_description my $port_vlan_description = $host_addr->port_vlan_description();
Use this method to retrieve the VLAN name of the network device port that is connected to the DHCP Host Address object.
none
The method returns the network device port VLAN name.
#Get port_vlan_name my $port_vlan_name = $host_addr->port_vlan_name();
Use this method to retrieve the VLAN number of the network device port that is connected to the DHCP Host Address object.
none
The method returns the port VLAN number.
#Get port_vlan_number my $port_vlan_number = $host_addr->port_vlan_number();
Use this method to set or retrieve the pxe_lease_time value of a DHCP Host Address object.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Note that when pxe_lease_time is set to a defined value and override_pxe_lease_time is set to "false", the last operation takes precedence. Thus the sequence $object->pxe_lease_time("369"); $object->override_pxe_lease_time("false"); will set override_pxe_lease_time to "false", and the sequence $object->override_pxe_lease_time("false"); $object->pxe_lease_time("369"); will set override_pxe_lease_time to "true".
Enter appropriate values in the Days, Hours, Mins and Secs fields. User can specify the duration of time it takes a host to connect to a boot server, such as a TFTP server, and download the file it needs to boot.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get pxe_lease_time my $pxe_lease_time = $host_addr->pxe_lease_time(); #Modify pxe_lease_time $host_addr->pxe_lease_time("369");
Use this method to set or retrieve the reserved discovery interface.
Valid value is an Infoblox::Grid::Discovery::DeviceInterface object.
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get reserved_interface my $reserved_interface = $host_addr->reserved_interface(); #Modify reserved_interface $host_addr->reserved_interface($interface);
Use this method to retrieve the name of the VMware cluster associated with the DHCP Host Address object. This method is read-only.
none
This method returns a string that contains the VMware cluster name. The default value is an empty string.
#Get v_cluster my $v_cluster = $host_addr->v_cluster();
Use this method to retrieve the name of the VMware datacenter associated with the DHCP Host Address object. This method is read-only.
none
This method returns a string that contains the VMware datacenter name. The default value is an empty string.
#Get v_datacenter my $v_datacenter = $host_addr->v_datacenter();
Use this method to retrieve the name of the VMware host associated with the DHCP Host Address object. This method is read-only.
none
This method returns a string that contains the VMware host name. The default value is an empty string.
#Get v_host my $v_host = $host_addr->v_host();
Use this method to retrieve the name of the VMware entity associated with the DHCP Host Address object. This method is read-only.
none
This method returns a string that contains the VMware entity name. The default value is an empty string.
#Get v_name my $v_name = $host_addr->v_name();
Use this method to retrieve the name of the physical network adapter through which the VMware entity is connected to the appliance. This method is read-only.
none
This method returns a string that contains the network adapter name. The default value is an empty string.
#Get v_netadapter my $v_netadapter = $host_addr->v_netadapter();
Use this method to retrieve the name of the virtual switch through which the VMware entity is connected to the appliance. This method is read-only.
none
This method returns a string that contains the virtual switch name. The default value is an empty string.
#Get v_switch my $v_switch = $host_addr->v_switch();
Use this method to retrieve the type of VMware entity associated with the DHCP Host Address object. This method is read-only.
none
This method returns a string that contains the VMware entity type. The default value is an empty string. The returned value, if any, can be one of the following:
VirtualMachine HostSystem VirtualCenter
#Get v_type my $v_type = $host_addr->v_type();
Use this method to set or retrieve the flag that indicates if this host address is used for inheritable extensible attributes.
Specify "true" to enable the flag or "false" to disable it. The default value is "false".
If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails.
If you did not specify a parameter, the method returns the attribute value.
#Get use_for_ea_inheritance my $use_for_ea_inheritance = $host_addr->use_for_ea_inheritance(); #Modify use_for_ea_inheritance $host_addr->use_for_ea_inheritance("true");
The following sample code demonstrates the different functions that can be applied to an object such as search and modify. This sample also includes error handling for the operations.
#Preparation prior to a DHCP IPv4 Host Address object insertion
#PROGRAM STARTS: Include all the modules that will be used, note the hostaddress option use strict; use Infoblox qw (:hostaddress);
#Create a session to the Infoblox appliance
my $session = Infoblox::Session->new( master => "192.168.1.2", #appliance host ip username => "admin", #appliance user login password => "infoblox" #appliance password );
unless ($session) { die("Construct session failed: ", Infoblox::status_code() . ":" . Infoblox::status_detail()); } print "Session created successfully\n";
#Create an IPv4 network object my $network = Infoblox::DHCP::Network->new( "network" => "10.0.0.0/8", ); unless($network) { die("Construct IPv4 Network object failed: ", Infoblox::status_code() . ":" . Infoblox::status_detail()); } print "IPv4 Network object created successfully\n";
$session->add($network) or die("Add network failed: ", $session->status_code() . ":" . $session->status_detail()); print "Network added successfully\n";
#Create a zone object my $zone = Infoblox::DNS::Zone->new( name => "test.com", ); unless($zone) { die("Construct Zone object failed: ", Infoblox::status_code() . ":" . Infoblox::status_detail()); } print "Zone object created successfully\n";
$session->add($zone) or die("Add zone failed: ", $session->status_code() . ":" . $session->status_detail()); print "Zone added successfully\n";
my $option1 = Infoblox::DHCP::Option->new( name => "routers", value => "10.0.0.100,10.0.0.200" );
unless($option1) { die("Construct option1 object failed: ", Infoblox::status_code() . ":" . Infoblox::status_detail()); } print "option1 object created successfully\n";
my $option2 = Infoblox::DHCP::Option->new( name => "nameservers", value => "1.1.1.1,2.2.2.2,3.3.3.3" ); unless($option2) { die("Construct option2 object failed: ", Infoblox::status_code() . ":" . Infoblox::status_detail()); } print "option2 object created successfully\n";
#Create a DHCP IPv4 Host address object
#Create a DHCP IPv4 Host Address object my $host_addr = Infoblox::DHCP::HostAddr->new( "ipv4addr" => "10.0.0.5", "mac" => "00:00:00:11:11:11", "pxe_lease_time" => 1234, "override_pxe_lease_time" => "true", "options" => [ $option1 , $option2 ], ); unless($host_addr) { die("Construct IPv4 host address failed: ", Infoblox::status_code() . ":" . Infoblox::status_detail()); } print "DHCP IPv4 Host address object created successfully\n";
my $host = Infoblox::DNS::Host->new( name => "host.test.com", ipv4addrs => [$host_addr], );
unless($host) { die("Construct IPv4 host record failed: ", Infoblox::status_code() . ":" . Infoblox::status_detail()); }
$session->add($host) or die("Add host failed: ", $session->status_code() . ":" . $session->status_detail()); print "Host added successfully\n";
#Get and modify a DHCP IPv4 Host Address object
#Get DHCP IPv4 Host Address object through the session my @retrieved_objs = $session->get( object => "Infoblox::DHCP::HostAddr", mac => "00:00:00:11:11:11", ); my $object = $retrieved_objs[0]; unless ($object) { die("Get IPv4 Host Address object failed: ", $session->status_code() . ":" . $session->status_detail()); } print "Get IPv4 Host Address object found at least 1 matching entry\n";
#Modify one of the attributes of the obtained IPv4 Host Address object $object->pxe_lease_time(1235);
#Apply the changes $session->modify($object) or die("Modify IPv4 Host Address object failed: ", $session->status_code() . ":" . $session->status_detail()); print "IPv4 Host Address object modified successfully \n";
#Verify that this was changed also when retrieving this via the host record my @retrieved_objs = $session->get( object => "Infoblox::DNS::Host", name => "host.test.com", ); my $object = $retrieved_objs[0]; unless ($object) { die("Get Host record failed: ", $session->status_code() . ":" . $session->status_detail()); } print "Get host record object found at least 1 matching entry\n";
my $hostaddress = @{$object->ipv4addrs()}[0];
unless ($hostaddress->pxe_lease_time() == 1235) { die("The modification of host address has failed: ", $session->status_code() . ":" . $session->status_detail()); } print "The change to preferred lifetime has succeeded correctly\n";
#The host address retrieved this way can also be modified without submitting the full host record $hostaddress->pxe_lease_time(1111);
#Apply the changes $session->modify($hostaddress) or die("Modify IPv4 Host Address object failed: ", $session->status_code() . ":" . $session->status_detail()); print "IPv4 Host Address object modified successfully \n";
#Verify the change was submitted successfully @retrieved_objs = $session->get( object => "Infoblox::DHCP::HostAddr", mac => "00:00:00:11:11:11", ); $object = $retrieved_objs[0]; unless ($object) { die("Get IPv4 Host Address object failed: ", $session->status_code() . ":" . $session->status_detail()); } print "Get IPv4 Host Address object found at least 1 matching entry\n";
unless ($hostaddress->pxe_lease_time() == 1111) { die("The modification of host address has failed: ", $session->status_code() . ":" . $session->status_detail()); }
#Submit the Host object for removal $session->remove($host) or die("Remove Host object failed: ", $session->status_code() . ":" . $session->status_detail()); print "Host object removed successfully \n";
#Submit the Zone object for removal $session->remove($zone) or die("Remove Zone object failed: ", $session->status_code() . ":" . $session->status_detail()); print "Zone object removed successfully \n";
#Submit the Network object for removal $session->remove($network) or die("Remove Network object failed: ", $session->status_code() . ":" . $session->status_detail()); print "Network object removed successfully \n";
Infoblox Inc. http://www.infoblox.com/
Infoblox::DHCP::Network, Infoblox::DHCP::View, Infoblox::DHCP::Range, Infoblox::DHCP::Lease, Infoblox::Session->add(), Infoblox::Session->get(), Infoblox::Session->modify(), Infoblox::Session->remove(), Infoblox::Session->search(), Infoblox::Session, Infoblox::Grid::MSServer::AdUser::Data, Infoblox::Grid::Discovery::Data
Copyright (c) 2017 Infoblox Inc.