Infoblox::DHCP::HostAddr - DHCP Host Address object.


NAME

Infoblox::DHCP::HostAddr - DHCP Host Address object.


DESCRIPTION

A Host Address is an object used to specify addresses in a DNS Host object.


CONSTRUCTOR

 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"
 );


SESSION METHODS

This section describes all the methods in Infoblox::Session module that you can apply to a DHCP Host Address object.

Infoblox::DNS::Host->ipv4addrs( )

Use this function to specify the addresses associated with the Host record. See Infoblox::DNS::Host->ipv4addrs() for parameters and return values.

Example
 #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]);

Infoblox::Session->get( )

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.

Key References
 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").
Examples
 #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');

Infoblox::Session->modify( )

Use this method to modify a DHCP Host Address object in the Infoblox appliance. See Infoblox::Session->modify() for parameters and return values.

Example
 #Use method to modify the pxe_lease_time
 $host_address->pxe_lease_time("1234");
 #Submit modification
 my $response = $session->modify( $host_address );

Infoblox::Session->search( )

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.

Key References
 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").
Examples
 # 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.*');


METHODS

This section describes all the methods that you can use to set and retrieve the attribute values of a DHCP Host Address object.

bootfile( )

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".

Parameter

The name of the file that the client must download. The default value is undefined.

Returns

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.

Example
 #Get bootfile
 my $bootfile = $host_addr->bootfile();
 #Modify bootfile
 $host_addr->bootfile("boot_file");

bootserver( )

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".

Parameter

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.

Returns

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.

Example
 #Get bootserver
 my $bootserver = $host_addr->bootserver();
 #Modify bootserver
 $host_addr->bootserver("bootserver2.com");
 #Un-override bootserver
 $host_addr->bootserver(undef);

configure_for_dhcp( )

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.

Parameter

Specify "true" to set the configure_for_dhcp flag or "false" to deactivate/unset it. The default value is "false".

Returns

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.

Example
 #Get configure_for_dhcp
 my $configure_for_dhcp = $host_addr->configure_for_dhcp();
 #Modify configure_for_dhcp
 $host_addr->configure_for_dhcp("true");

deny_bootp( )

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".

Parameter

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.

Returns

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.

Example
 #Get deny_bootp
 my $deny_bootp = $host_addr->deny_bootp();
 #Modify deny_bootp
 $host_addr->deny_bootp("true");

discovered_data( )

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.

Parameter

None

Returns

The valid return value is an Infoblox::Grid::Discovery::Data object.

Example
 #Get discovered_data value
 my $discovered_data = $object->discovered_data();

discovered_mac( )

Use this method to retrieve the discovered MAC address of a DHCP Host Address object.

Parameter

none

Returns

The method returns the discovered MAC address.

Example
 #Get discovered_mac
 my $discovered_mac = $host_addr->discovered_mac();

discovered_name( )

Use this method to retrieve the discovered name of a DHCP Host Address object.

Parameter

none

Returns

The method returns the discovered name.

Example
 #Get discovered_name
 my $discovered_name = $host_addr->discovered_name();

discoverer( )

Use this method to retrieve the discoverer of a DHCP Host Address object.

Parameter

none

Returns

The method returns the discoverer value.

Example
 #Get discoverer
 my $discoverer = $host_addr->discoverer();

discover_now_status( )

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.

Parameter

None.

Returns

The method returns the attribute value that can be 'COMPLETE', 'FAILED', 'NONE', 'PENDING' or 'RUNNING'.

Example
 #Get discover_now_status
 my $discover_now_status = $host_addr->discover_now_status();

enable_pxe_lease_time( )

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.

Parameter

Specify "true" to set the enable_pxe_lease_time flag or "false" to deactivate/unset it. The default value is "false".

Returns

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.

Example
 #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");

first_discovered( )

Use this method to retrieve the date and time that the DHCP Host Address object was first discovered.

Parameter

none

Returns

The method returns the date and time that the DHCP Host Address object was first discovered.

Example
 #Get first_discovered
 my $first_discovered = $host_addr->first_discovered();

host( )

Use this method to retrieve the name of the Host record this address belongs to.

Parameter

none

Returns

The method returns the host value.

Example
 #Get host
 my $host = $host_addr->host();

ignore_client_requested_options( )

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".

Parameter

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.

Returns

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.

Example
 # 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");

ipv4addr( )

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.

Parameter

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).

Returns

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.

Example
 #Get ipv4addr
 my $ipv4addr = $host_addr->ipv4addr();
 #Modify ipv4addr
 $host_addr->ipv4addr("10.0.0.5");

is_invalid_mac( )

Use this method to retrieve the flag used to indicate whether an invalid MAC address is used. This is a read-only attribute.

Parameter

None

Returns

The method returns the attribute value.

Example
 #Get is_invalid_mac value
 my $is_invalid_mac = $host_addr->is_invalid_mac();

last_discovered( )

Use this method to retrieve the time this object was last seen by a discovery job.

The default value for this field is empty.

Parameter

N/A

Returns

The method returns the attribute value.

Example
 #Get last_discovered
 my $last_discovered = $host_addr->last_discovered();

last_queried( )

Use this method to retrieve the time when the associated record was last queried. This is a read-only attribute.

Parameter

None

Returns

The method returns the attribute value. The number of seconds that have elapsed since January 1st, 1970 UTC.

Example
 #Get last_queried
 my $last_queried = $host_addr->last_queried();

logic_filters( )

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.

Parameter

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:

Filter name must be globally unique.
Filters without expressions must be at the end of the list.
The filters should not be disabled.

The default value of the parameter is undefined.

Returns

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.

Example
 #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.

mac( )

 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.

Parameter

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.

Returns

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.

Example
 #Get mac
 my $mac = $host_addr->mac();
 #Modify mac
 $host_addr->mac("11::11::11::11::11::12");

match_client( )

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.

Parameter
    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.
Returns
    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.
Example
 #Get match_client
 my $match_client = $host_addr->match_client();
 #Modify match_client
 $host_addr->match_client("CLIENT_IDENTIFIER");

ms_ad_user_data( )

Use this method to retrieve Microsoft Active Directory users related information. This is a read-only attribute.

Parameter

None

Returns

The valid return value is an Infoblox::Grid::MSServer::AdUser::Data object.

Example
 #Get ms_ad_user_data value
 my $value = $object->ms_ad_user_data();

netbios( )

Use this method to retrieve the name in the NetBIOS reply that responded to a NetBIOS query.

Returns

The method returns the attribute value.

Example
 #Get netbios
 my $netbios = $host_addr->netbios();

network( )

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.

Parameter

None

Returns

The method returns the attribute value.

Example
 #Get network
 my $network = $host_addr->network();

network_component_description( )

Use this method to retrieve the description of the network device that is connected to the DHCP Host Address object.

Parameter

none

Returns

The method returns the network device description.

Example
 #Get network_component_description
 my $network_component_description = $host_addr->network_component_description();

network_component_ip( )

Use this method to retrieve the IP address of the network device that is connected to the DHCP Host Address object.

Parameter

none

Returns

The method returns the IP address of the network device.

Example
 #Get network_component_ip
 my $network_component_ip = $host_addr->network_component_ip();

network_component_name( )

Use this method to retrieve the name of the network device that is connected to the DHCP Host Address object.

Parameter

none

Returns

The method returns the network device name.

Example
 #Get network_component_name
 my $network_component_name = $host_addr->network_component_name();

network_component_port_description( )

Use this method to retrieve the description of the network device port that is connected to the DHCP Host Address object.

Parameter

none

Returns

The method returns the description of the port on the network device.

Example
 #Get network_component_port_description
 my $network_component_port_description = $host_addr->network_component_port_description();

network_component_port_name( )

Use this method to retrieve the name of the network device port that is connected to the DHCP Host Address object.

Parameter

none

Returns

The method returns the name of the port on the network device.

Example
 #Get network_component_port_name
 my $network_component_port_name = $host_addr->network_component_port_name();

network_component_port_number( )

Use this method to retrieve the number of the network device port that is connected to the DHCP Host Address object.

Parameter

none

Returns

The method returns the network device port number.

Example
 #Get network_component_port_number
 my $network_component_port_number = $host_addr->network_component_port_number();

network_component_type( )

Use this method to retrieve the type of the network device that is connected to DHCP Host Address object.

Parameter

none

Returns

The method returns the network device type.

Example
 #Get network_component_type
 my $network_component_type = $host_addr->network_component_type();

nextserver( )

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".

Parameter

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.

Returns

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.

Example
 #Get nextserver
 my $nextserver = $host_addr->nextserver();
 #Modify nextserver
 $host_addr->nextserver("3.3.3.4");
 #Un-override nextserver
 $host_addr->nextserver(undef);

options( )

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".

Parameter

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.

Returns

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.

Example
 #Get options
 my $options = $host_addr->options();
 #Modify options
 $host_addr->options([$option1, $option2]);

os( )

Use this method to retrieve the operating system associated with this host address.

Returns

The method returns the attribute value.

Example
 #Get os
 my $os = $host_addr->os();

override_bootfile( )

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.

Parameter

Specify "true" to set the override_bootfile flag or "false" to deactivate/unset it. The default value is "false".

Returns

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.

Example
 #Get override_bootfile
 my $override = $host_addr->override_bootfile();
 #Modify the override
 $host_addr->override_bootfile("true");

override_bootserver( )

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.

Parameter

Specify "true" to set the override_bootserver flag or "false" to deactivate/unset it. The default value is "false".

Returns

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.

Example
 #Get override_bootserver
 my $override = $host_addr->override_bootserver();
 #Modify the override
 $host_addr->override_bootserver("true");

override_deny_bootp( )

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.

Parameter

Specify "true" to set the override_deny_bootp flag or "false" to deactivate/unset it. The default value is "false".

Returns

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.

Example
 #Get override_deny_bootp
 my $override = $host_addr->override_deny_bootp();
 #Modify the override
 $host_addr->override_deny_bootp("true");

override_ignore_client_requested_option( )

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.

Parameter

Specify "true" to set the override_ignore_client_requested_option flag or "false" to deactivate/unset it. The default value is "false".

Returns

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.

Example
 #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");

override_logic_filters( )

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.

Parameter

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".

Returns

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.

Example
 #Getting override_logic_filters
 my $override_logic_filters=$host_addr->override_logic_filters( );
 #Modifying override_logic_filters
 $host_addr->override_logic_filters("true");

override_nextserver( )

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.

Parameter

Specify "true" to set the override_nextserver flag or "false" to deactivate/unset it. The default value is "false".

Returns

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.

Example
 #Get override_nextserver
 my $override = $host_addr->override_nextserver();
 #Modify the override
 $host_addr->override_nextserver("true");

override_options( )

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.

Parameter

Specify "true" to set the override_options flag or "false" to deactivate/unset it. The default value is "false".

Returns

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.

Example
 #Get override_options
 my $override = $host_addr->override_options();
 #Modify the override
 $host_addr->override_options("true");

override_pxe_lease_time( )

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.

Parameter

Specify "true" to set the override_pxe_lease_time flag or "false" to deactivate/unset it. The default value is "false".

Returns

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.

Example
 #Get override_pxe_lease_time
 my $override = $host_addr->override_pxe_lease_time();
 #Modify the override
 $host_addr->override_pxe_lease_time("true");

port_duplex( )

Use this method to retrieve the duplex setting of the network device port that is connected to the DHCP Host Address object.

Parameter

none

Returns

The method returns the port duplex setting. The returned value, if any, is one of the following:

  Full
  Half
Example
 #Get port_duplex
 my $port_duplex = $host_addr->port_duplex();

port_link_status( )

Use this method to retrieve the link status of the network device port that is connected to the DHCP Host Address object.

Parameter

none

Returns

The method returns the network device port link status. The returned value, if any, is one of the following:

  Connected
  Not Connected
  Unknown
Example
 #Get port_link_status
 my $port_link_status = $host_addr->port_link_status();

port_speed( )

Use this method to retrieve the speed of the network device port that is connected to the DHCP Host Address object.

Parameter

none

Returns

The method returns the network device port speed. The returned value, if any, is one of the following:

  10M
  100M
  1G
  10G
  100G
  Unknown
Example
 #Get port_speed
 my $port_speed = $host_addr->port_speed();

port_status( )

Use this method to retrieve the status of the network device port that is connected to the DHCP Host Address object.

Parameter

none

Returns

The method returns the network device port status. The returned value, if any, is one of the following:

  Up
  Down
  Unknown
Example
 #Get port_status
 my $port_status = $host_addr->port_status();

port_vlan_description( )

Use this method to retrieve the VLAN description of the network device port that is connected to the DHCP Host Address object.

Parameter

none

Returns

The method returns the VLAN description of the network device port.

Example
 #Get port_vlan_description
 my $port_vlan_description = $host_addr->port_vlan_description();

port_vlan_name( )

Use this method to retrieve the VLAN name of the network device port that is connected to the DHCP Host Address object.

Parameter

none

Returns

The method returns the network device port VLAN name.

Example
 #Get port_vlan_name
 my $port_vlan_name = $host_addr->port_vlan_name();

port_vlan_number( )

Use this method to retrieve the VLAN number of the network device port that is connected to the DHCP Host Address object.

Parameter

none

Returns

The method returns the port VLAN number.

Example
 #Get port_vlan_number
 my $port_vlan_number = $host_addr->port_vlan_number();

pxe_lease_time( )

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".

Parameter

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.

Returns

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.

Example
 #Get pxe_lease_time
 my $pxe_lease_time = $host_addr->pxe_lease_time();
 #Modify pxe_lease_time
 $host_addr->pxe_lease_time("369");

reserved_interface( )

Use this method to set or retrieve the reserved discovery interface.

Parameter

Valid value is an Infoblox::Grid::Discovery::DeviceInterface object.

Returns

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.

Example
 #Get reserved_interface
 my $reserved_interface = $host_addr->reserved_interface();
 #Modify reserved_interface
 $host_addr->reserved_interface($interface);

v_cluster( )

Use this method to retrieve the name of the VMware cluster associated with the DHCP Host Address object. This method is read-only.

Parameter

none

Returns

This method returns a string that contains the VMware cluster name. The default value is an empty string.

Example
 #Get v_cluster
 my $v_cluster = $host_addr->v_cluster();

v_datacenter( )

Use this method to retrieve the name of the VMware datacenter associated with the DHCP Host Address object. This method is read-only.

Parameter

none

Returns

This method returns a string that contains the VMware datacenter name. The default value is an empty string.

Example
 #Get v_datacenter
 my $v_datacenter = $host_addr->v_datacenter();

v_host( )

Use this method to retrieve the name of the VMware host associated with the DHCP Host Address object. This method is read-only.

Parameter

none

Returns

This method returns a string that contains the VMware host name. The default value is an empty string.

Example
 #Get v_host
 my $v_host = $host_addr->v_host();

v_name( )

Use this method to retrieve the name of the VMware entity associated with the DHCP Host Address object. This method is read-only.

Parameter

none

Returns

This method returns a string that contains the VMware entity name. The default value is an empty string.

Example
 #Get v_name
 my $v_name = $host_addr->v_name();

v_netadapter( )

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.

Parameter

none

Returns

This method returns a string that contains the network adapter name. The default value is an empty string.

Example
 #Get v_netadapter
 my $v_netadapter = $host_addr->v_netadapter();

v_switch( )

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.

Parameter

none

Returns

This method returns a string that contains the virtual switch name. The default value is an empty string.

Example
 #Get v_switch
 my $v_switch = $host_addr->v_switch();

v_type( )

Use this method to retrieve the type of VMware entity associated with the DHCP Host Address object. This method is read-only.

Parameter

none

Returns

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
Example
 #Get v_type
 my $v_type = $host_addr->v_type();

use_for_ea_inheritance( )

Use this method to set or retrieve the flag that indicates if this host address is used for inheritable extensible attributes.

Parameter

Specify "true" to enable the flag or "false" to disable it. The default value is "false".

Returns

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.

Example
 #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");


SAMPLE CODE

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";


AUTHOR

Infoblox Inc. http://www.infoblox.com/


SEE ALSO

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

Copyright (c) 2017 Infoblox Inc.