Infoblox::DHCP::IPv6HostAddr - DHCP IPv6 Host Address object.


NAME

Infoblox::DHCP::IPv6HostAddr - DHCP IPv6 Host Address object.


DESCRIPTION

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


CONSTRUCTOR

 my $host_addr = Infoblox::DHCP::IPv6HostAddr -> new(
       duid                            => $string,                     # Required
       address_type                    => "ADDRESS" | "PREFIX" | "BOTH", # Optional / Default is "ADDRESS"
       configure_for_dhcp              => "true" | "false",            # Optional / Default is "false"
                                                                       # When both the IP address and DUID are present, the default value is "true"
                                                                       # Applicable only when adding this host address to a host
       domain_name                     => $string,                     # Optional / Default is undefined
       domain_name_servers             => "$ipv6addr1,$ipv6addr2,...", # Optional / Default is undefined
       ipv6addr                        => $ipv6addr,                   # Optional / one of ipv6addr or ipv6prefix is required
       ipv6prefix                      => $ipv6addr,                   # Optional / one of ipv6addr or ipv6prefix is required
       ipv6prefix_bits                 => $ipv6addr,                   # Optional / Required if ipv6prefix is specified
       match_client                    => $string,                     # Optional / Default is "DUID"
                                                                       # Possible values are:
                                                                       #  "DUID", "RESERVED",
       options                         => [$option1, $option2, ...]    # Optional / Default is empty
       override_domain_name            => "true" | "false",            # Optional / Default value is "false"
       override_domain_name_servers    => "true" | "false",            # Optional / Default value is "false"
       override_options                => "true" | "false",            # Optional / Default value is "false"
       override_preferred_lifetime     => "true" | "false",            # Optional / Default value is "false"
       override_valid_lifetime         => "true" | "false",            # Optional / Default value is "false"
       preferred_lifetime              => $num,                        # Optional / Default is "27000"
       valid_lifetime                  => $num,                        # Optional / Default is 43200
       use_for_ea_inheritance          => "true" | "false",            # Optional / Default value is "false"
       reserved_interface              => $interface,                  # Optional
 );


SESSION METHODS

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

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

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

Example
 #Construct a Host Address object
 my $h1 = Infoblox::DHCP::HostAddr->new(
                                         duid     => '0cc084d303010003',
                                         ipv6addr => '2001::4',
 );
 # Configure an address in the Host record object
 $host->ipv6addrs([$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 IPv6 Host Address object:
  comment                               - Optional. User-specified comment for the host address.
  duid                                  - Optional. DUID of the host address.
  ipv6addr                              - Optional. IPv6 address of the host address.
  network                               - Optional. Network address of the host address.
  network_view                          - Optional. Network view in which the host address is located. By default, all network views are searched.
  extensible_attributes                 - Optional. A hash reference containing extensible attributes.
  discovered_duid                       - Optional. Discovered DHCPv6 UID.
  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.
Examples
 #Get DHCP IPv6 Host Address object through the session
 my @retrieved_objs = $session->get(
     object => "Infoblox::DHCP::IPv6HostAddr",
     duid   => "0001",
 );
 my @retrieved_objs = $session->get(
     object       => "Infoblox::DHCP::IPv6HostAddr",
     ipv6addr     => "2001::1",
 );

Infoblox::Session->modify( )

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

Example
 #Use method to modify the preferred_lifetime
 $ipv6ha->preferred_lifetime("1234567");
 #Submit modification
 my $response = $session->modify( $ipv6ha );

Infoblox::Session->search( )

Use this method to search for DHCP IPv6 Host Address object and matching Host object with MAC address in the Infoblox appliance. 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 IPv6 Host Address object:
  comment                               - Optional. User-specified comment for the host address.
  duid                                  - Optional. DUID of the host address.
  ipv6addr                              - Optional. IPv6 address of the host address.
  network                               - Optional. Network address of the host address.
  network_view                          - Optional. Network view in which the host address is located. By default, all network views are searched.
  discovered_duid                       - Optional. Discovered DHCPv6 UID.
  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 numbe.
Examples
 # Search for all DHCP IPv6 Host Address objects that are specified in the network "2001::/24" in the "default" network view.
 my @retrieved_objs = $session->search(
     object       => "Infoblox::DHCP::IPv6HostAddr",
     duid         => "0001",
 );


METHODS

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

address_type( )

Use this method to set or retrieve the address type of a DHCP IPv6 Host Address object.

Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.

Parameter

Valid values are "ADDRESS", "PREFIX", or "BOTH". When the address type is "ADDRESS", a value for the 'ipv6addr' member is required. When the address type is "PREFIX", values for 'ipv6prefix' and 'ipv6prefix_bits' are required. When the address type is "BOTH", values for 'ipv6addr', 'ipv6prefix', and 'ipv6prefix_bits' are all required.

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 address_type
 my $address_type = $ipv6ha->address_type();
 #Modify address_type
 $ipv6ha->address_type("PREFIX");

configure_for_dhcp( )

Use this method to set or retrieve the configure_for_dhcp flag of a DHCP IPv6 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 = $ipv6ha->configure_for_dhcp();
 #Modify configure_for_dhcp
 $ipv6ha->configure_for_dhcp("true");

discovered_data( )

Use this method to retrieve the discovered data of a DHCP IPv6 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_duid( )

Use this method to retrieve the discovered DHCPv6 UID (DUID) of a DHCP IPv6 Host Address object.

Parameter

none

Returns

The method returns the discovered name.

Example
 #Get discovered_duid
 my $discovered_duid = $ipv6ha->discovered_duid();

discovered_name( )

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

Parameter

none

Returns

The method returns the discovered name.

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

discoverer( )

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

Parameter

none

Returns

The method returns the discoverer value.

Example
 #Get discoverer
 my $discoverer = $ipv6ha->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 = $ipv6ha->discover_now_status();

domain_name( )

Use this method to set or retrieve the domain_name value of a DHCP IPv6 host address object.

Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.

Setting this method to a defined value implicitly sets the override_domain_name method to "true". Setting the parameter to undefined causes the appliance to use the upper-level default and automatically resets the override_domain_name attribute to "false".

Note that when domain_name is set to a defined value and override_domain_name is set to "false", the last operation takes precedence. Thus the sequence $object->domain_name("testdomain"); $object->override_domain_name("false"); will set override_domain_name to "false", and the sequence $object->override_domain_name("false"); $object->domain_name("testdomain"); will set override_domain_name to "true".

Parameter

The client's domain name in string format.

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 domain_name
 my $domain_name = $host_addr->domain_name();
 #Modify domain_name
 $host_addr->domain_name("test_domain.com");

domain_name_servers( )

Use this method to set or retrieve the domain_name_servers value of a DHCP IPv6 host address object.

Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.

Setting this method to a defined value implicitly sets the override_domain_name_servers method to "true". Setting the parameter to undefined causes the appliance to use the upper-level default and automatically resets the override_domain_name_servers attribute to "false".

Note that when domain_name_servers is set to a defined value and override_domain_name_servers is set to "false", the last operation takes precedence. Thus the sequence $object->domain_name_servers("2001::1,2001::2"); $object->override_domain_name_servers("false"); will set override_domain_name_servers to "false", and the sequence $object->override_domain_name_servers("false"); $object->domain_name_servers("2001::1,2001::2"); will set in override_domain_name_servers to "true".

Parameter

The comma-separated list of domain name server addresses in IPv6 address format.

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 domain_name_servers
 my $domain_name_servers = $host_addr->domain_name_servers();
 #Modify domain_name_servers
 $host_addr->domain_name_servers("2001::1,2001::2");

duid( )

Use this method to set or retrieve the DHCPv6 Unique Identifier (DUID) of the IPv6 Host Address object.

Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.

Parameter

The DUID of the matching client in hexadecimal format.

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 duid
 my $duid = $ipv6ha->duid();
 #Modify duid
 $ipv6ha->duid("1c2edfaa");

first_discovered( )

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

Parameter

none

Returns

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

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

ipv6addr( )

Use this method to set or retrieve the the IPv6 address of the IPv6 Host Address object.

Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.

Parameter

An IPv6 address is a 128-bit number represented as eight groups of four hexadecimal digits (i.e. two octets), with each group separated by a colon(:) (example: 2001:0db8:85a3:0000:0000:8a2e:0370:7334). Leading zeroes and groups of consecutive zeros within the value can be omitted to produce a more compact representation (example: 2001::1, ::1), and dotted-quad notations can be used to express IPv4-mapped IPv6 addresses (example: ::ffff:192.0.2.128).

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 ipv6addr
 my ipv6addr = $ipv6ha->ipv6addr();
 #Modify ipv6addr
 $ipv6ha->ipv6addr("aaaa:1111:bbbb:2222:cccc:3333:dddd:5555");

ipv6prefix( )

Use this method to set or retrieve the IPv6 prefix of a DHCP IPv6 Host Address object. The prefix must belong to the list of global prefixes defined in the Infoblox::Grid::DHCP object.

Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.

Parameter

IPv6 prefix from the list of global IPv6 prefixes.

Returns

If you specified a parameter, the method returns true when the modification succeeds, and returns false when the operation fails. ls.

If you did not specify a parameter, the method returns the attribute value.

Example
 #Get ipv6prefix
 my $ipv6prefix = $ipv6ha->ipv6prefix();
 #Modify ipv6prefix
 $ipv6ha->ipv6prefix("2001::");

ipv6prefix_bits( )

Use this method to set or retrieve the prefix bits for the DHCP IPv6 Host Address.

Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.

Parameter

An unsigned integer between 2 and 128.

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 ipv6prefix_bits
 my $ipv6prefix_bits = $ipv6ha->ipv6prefix_bits();
 #Modify ipv6prefix_bits
 $ipv6ha->ipv6prefix_bits(32);

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 = $ipv6ha->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 = $ipv6ha->last_queried();

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 "DUID": The fixed IP address is leased to the matching DUID.
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 = $ipv6ha->match_client();
 #Modify match_client
 $ipv6ha->match_client("DUID");

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
 my $ms_ad_user_data = $host_addr->ms_ad_user_data();

name( )

Use this method to set or retrieve the name of a DHCP IPv6 Host Address object. The same name can be used for multiple host addresses.

Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.

Parameter

Specify a name in string format.

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 the name
 my $name = $ipv6ha->name();
 #Modify the name
 $ipv6ha->name("pop-server");

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 = $ipv6ha->netbios();

network( )

Use this method to retrieve the network value of a DHCP IPv6 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 value
 my $value = $object->network();

network_component_description( )

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

Parameter

none

Returns

The method returns the network device description.

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

network_component_ip( )

Use this method to retrieve the IP address of the network device that is connected to the DHCP IPv6 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 = $ipv6ha->network_component_ip();

network_component_name( )

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

Parameter

none

Returns

The method returns the network device name.

Example
 #Get network_component_name
 my $network_component_name = $ipv6ha->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 IPv6 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 = $ipv6ha->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 IPv6 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 = $ipv6ha->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 IPv6 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 = $ipv6ha->network_component_port_number();

network_component_type( )

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

Parameter

none

Returns

The method returns the network device type.

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

options( )

Use this method to set or retrieve the options of a DHCP IPv6 Host Address object.

Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.

Setting this method to a defined value implicitly sets the override_options method to "true". Setting the parameter to undefined causes the appliance to use the grid default and automatically resets the override_options attribute to "false".

Note that when the options method is set to a defined value and override_options is set to "false", the last operation takes precedence. Thus the sequence $object->options([ $opt ]); $object->override_options("false"); will set override_options to "false", and the sequence $object->override_options("false"); $object->options([ $opt ]); will set override_options to "true".

Parameter

The valid value is an array reference that contains Infoblox::DHCP::Option object(s).

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 = $ipv6ha->options();
 #Modify options
 my $option1 = Infoblox::DHCP::Option->new(
     name   => "dhcp6.rapid-commit",
     value  => "true"
 );
 $ipv6ha->options([$option1);

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 = $ipv6ha->os();

override_domain_name( )

The override_domain_name attribute controls whether the domain_name value in the DHCP IPv6 host address is used, instead of the upper-level default.

The override_domain_name attribute can be specified explicitly. It is also set implicitly when domain_name 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 upper-level setting for domain_name. Set the parameter to "false" to inherit the upper-level setting for domain_name.

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
 #Get override_domain_name
 my $override_domain_name=$ipv6ha->override_domain_name( );
 #Modify override_domain_name
 $ipv6ha->override_domain_name("true");

override_domain_name_servers( )

The override_domain_name_servers attribute controls whether the domain_name_servers value in the DHCP IPv6 host address is used, instead of the upper-level default.

The override_domain_name_servers attribute can be specified explicitly. It is also set implicitly when domain_name_servers 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 upper-level setting for domain_name_servers. Set the parameter to "false" to inherit the upper-level setting for domain_name_servers.

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
    #Get override_domain_name_servers
    my $override_domain_name_servers=$ipv6ha->override_domain_name_servers( );
    #Modify override_domain_name_servers
    $ipv6ha->override_domain_name_servers("true");

override_options( )

The override_options attribute controls whether the options in the DHCP IPv6 host address are used, instead of the upper-level default.

The override_options attribute can be specified explicitly. It is also set implicitly when options are set to defined values.

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 upper-level setting for valid_lifetime. Set the parameter to "false" to inherit the upper-level setting for valid_lifetime.

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
    #Get override_options
    my $override_options=$host_addr->override_options( );
    #Modify override_options
    $host_addr->override_options("true");

override_preferred_lifetime( )

The override_preferred_lifetime attribute controls whether the preferred_lifetime value in the DHCP IPv6 host address is used, instead of the upper-level default.

The override_preferred_lifetime attribute can be specified explicitly. It is also set implicitly when preferred_lifetime 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 upper-level setting for valid_lifetime. Set the parameter to "false" to inherit the upper-level setting for valid_lifetime.

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
    #Get override_preferred_lifetime
    my $override_preferred_lifetime=$host_addr->override_preferred_lifetime( );
    #Modify override_preferred_lifetime
    $host_addr->override_preferred_lifetime("true");

override_valid_lifetime( )

The override_valid_lifetime attribute controls whether the valid_lifetime value in the DHCP IPv6 host address is used, instead of the upper-level default.

The override_valid_lifetime attribute can be specified explicitly. It is also set implicitly when valid_lifetime 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 upper-level setting for valid_lifetime. Set the parameter to "false" to inherit the upper-level setting for valid_lifetime.

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
    #Get override_valid_lifetime
    my $override_valid_lifetime=$host_addr->override_valid_lifetime( );
    #Modify override_valid_lifetime
    $host_addr->override_valid_lifetime("true");

port_duplex( )

Use this method to retrieve the duplex setting of the network device port that is connected to the DHCP IPv6 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 = $ipv6ha->port_duplex();

port_link_status( )

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

Parameter

none

Returns

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

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

port_speed( )

Use this method to retrieve the speed of the network device port that is connected to the DHCP IPv6 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 = $ipv6ha->port_speed();

port_status( )

Use this method to retrieve the status of the network device port that is connected to the DHCP IPv6 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 = $ipv6ha->port_status();

port_vlan_description( )

Use this method to retrieve the VLAN description of the network device port that is connected to the DHCP IPv6 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 = $ipv6ha->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 IPv6 Host Address object.

Parameter

none

Returns

The method returns the network device port VLAN name.

Example
 #Get port_vlan_name
 my $port_vlan_name = $ipv6ha->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 IPv6 Host Address object.

Parameter

none

Returns

The method returns the port VLAN number.

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

preferred_lifetime( )

Use this method to set or retrieve the preferred_lifetime value of a DHCP IPv6 Host Address object.

Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.

Setting this method to a defined value implicitly sets the override_preferred_lifetime method to "true". Setting the parameter to undefined causes the appliance to use the upper-level default and automatically resets the override_preferred_lifetime attribute to "false".

Note that when preferred_lifetime is set to a defined value and override_preferred_lifetime is set to "false", the last operation takes precedence. Thus the sequence $object->preferred_lifetime(20000); $object->override_preferred_lifetime("false"); will set override_preferred_lifetime to "false", and the sequence $object->override_preferred_lifetime("false"); $object->preferred_lifetime(20000); will set override_preferred_lifetime to "true".

Parameter

A 32-bit integer (valid range from 1 to 4294967295) that represents the lifetime, in seconds. The default value is 27000.

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 preferred_lifetime
 my $preferred_lifetime = $ipv6ha->preferred_lifetime();
 #Modify preferred_lifetime
 $ipv6ha->preferred_lifetime("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 = $ipv6ha->reserved_interface();
 #Modify reserved_interface
 $ipv6ha->reserved_interface($interface);

valid_lifetime( )

Use this method to set or retrieve the valid_lifetime value of a DHCP IPv6 Host Address object.

Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.

Parameter

A 32-bit integer, from 1 to 4294967295, that represents the lifetime, in seconds. The default value is 43200.

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 valid_lifetime
 my $valid_lifetime = $ipv6ha->valid_lifetime();
 #Modify valid_lifetime
 $ipv6ha->valid_lifetime("36900");

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 = $ipv6ha->use_for_ea_inheritance();
 #Modify use_for_ea_inheritance
 $ipv6ha->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 IPv6 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 IPv6 network object
 my $network = Infoblox::DHCP::IPv6Network->new(
                                            "network" => "2001::/64",
                                           );
 unless($network) {
      die("Construct IPv6 Network object failed: ",
            Infoblox::status_code() . ":" . Infoblox::status_detail());
 }
 print "IPv6 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"  => "dhcp6.fqdn",
     "value" => "mydomain.com"
 );
 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"     => "dhcp6.info-refresh-time",
     "value"    => "1000",
 );
 unless($option2) {
     die("Construct option2 object failed: ",
         Infoblox::status_code() . ":" . Infoblox::status_detail());
 }
 print "option2 object created successfully\n";

#Create a DHCP IPv6 Host address object

 #Create a DHCP IPv6 Host Address object
 my $host_addr = Infoblox::DHCP::IPv6HostAddr->new(
        "ipv6addr"                    => "2001::4",
        "duid"                        => "00:00:00:11:11:11",
        "domain_name"                 => "foo.com",
        "domain_name_servers"         => "2002::1,2002::2",
        "preferred_lifetime"          => 1234,
        "override_preferred_lifetime" => "true",
        "valid_lifetime"              => 123456,
        "override_valid_lifetime"     => "true",
        "options"                     => [ $option1 , $option2 ],
        );
 unless($host_addr) {
      die("Construct IPv6 host address failed: ",
            Infoblox::status_code() . ":" . Infoblox::status_detail());
 }
 print "DHCP IPv6 Host address object created successfully\n";
 my $host = Infoblox::DNS::Host->new(
                                     name         => "host.test.com",
                                     ipv6addrs    => [$host_addr],
                                    );
 unless($host) {
      die("Construct IPv6 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 IPv6 Host Address object

 #Get DHCP IPv6 Host Address object through the session
 my @retrieved_objs = $session->get(
     object => "Infoblox::DHCP::IPv6HostAddr",
     duid    => "00:00:00:11:11:11",
 );
 my $object = $retrieved_objs[0];
 unless ($object) {
     die("Get IPv6 Host Address object failed: ",
         $session->status_code() . ":" . $session->status_detail());
 }
 print "Get IPv6 Host Address object found at least 1 matching entry\n";
 #Modify one of the attributes of the obtained IPv6 Host Address object
 $object->preferred_lifetime(1235);
 #Apply the changes
 $session->modify($object)
     or die("Modify IPv6 Host Address object failed: ",
            $session->status_code() . ":" . $session->status_detail());
 print "IPv6 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->ipv6addrs()}[0];
 unless ($hostaddress->preferred_lifetime() == 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->preferred_lifetime(1111);
 #Apply the changes
 $session->modify($hostaddress)
     or die("Modify IPv6 Host Address object failed: ",
            $session->status_code() . ":" . $session->status_detail());
 print "IPv6 Host Address object modified successfully \n";
 #Verify the change was submitted successfully
 @retrieved_objs = $session->get(
     object => "Infoblox::DHCP::IPv6HostAddr",
     duid    => "00:00:00:11:11:11",
 );
 $object = $retrieved_objs[0];
 unless ($object) {
     die("Get IPv6 Host Address object failed: ",
         $session->status_code() . ":" . $session->status_detail());
 }
 print "Get IPv6 Host Address object found at least 1 matching entry\n";
 unless ($hostaddress->preferred_lifetime() == 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::IPv6Network, Infoblox::DHCP::View, Infoblox::DHCP::IPv6Range, Infoblox::Session->get(), Infoblox::Session->modify(), Infoblox::Session->search(), Infoblox::Session, Infoblox::Grid::Discovery::Data, Infoblox::Grid::MSServer::AdUser::Data


COPYRIGHT

Copyright (c) 2017 Infoblox Inc.