Infoblox::DTC::LBDN - A DTC Load Balanced Domain Name object.


NAME

Infoblox::DTC::LBDN - A DTC Load Balanced Domain Name object.


DESCRIPTION

A DTC Load Balanced Domain Name object.


CONSTRUCTOR

 my $lbdn = Infoblox::DTC::LBDN->new(
    name                  => $string,                                                               #Required     
    lb_method             => 'GLOBAL_AVAILABILITY' | 'RATIO' | 'ROUND_ROBIN' | 'TOPOLOGY',          #Required
    patterns              => [$pattern1, $pattern2, ...],                                           #Optional / Default is undefined
    disable               => 'true' | 'false',                                                      #Optional / Default is 'false'
    comment               => $string,                                                               #Optional / Default is undefined
    persistence           => $uint,                                                                 #Optional / Default is undefined
    topology              => $topology_obj,                                                         #Optional / Default is undefined
    ttl                   => $uint,                                                                 #Optional / Default is undefined
    types                 => ['A', 'AAAA', 'NAPTR', 'CNAME'],                                       #Optional / Default is ['A', 'AAAA']
    override_ttl          => 'true' | 'false',                                                      #Optional / Default is 'false'
    pools                 => [$pool_link_obj1, $pool_link_obj2, ...],                               #Optional / Default is undefined
    priority              => $uint,                                                                 #Optional / Default is 1
    auth_zones            => [$auth_zone1, $auth_zone2, ...],                                       #Optional / Default is undefined
    extattrs              => { $string => $extattr, ... },                                          #Optional / Default is undefined
    extensible_attributes => { $string => $string | $num, $string => [ $string | $num, ... ], ... } #Optional / Default is undefined
 );
    
 You cannot set both extattrs and extensible_attributes attributes at the same time.


SESSION METHODS

This section describes all the methods in a Session module that you can apply to a DTC LBDN object.

Infoblox::Session->add( )

Use this method to add an object to the Infoblox appliance. See Infoblox::Session->add() for parameters and return values.

Example
 #construct an object
 my $lbdn = Infoblox::DTC::LBDN->new(
    name      => 'load_bal',
    lb_method => 'GLOBAL_AVAILABILITY',
 );
 #submit for addition
 my $response = $session->add($lbdn);

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.

Key Reference
 Apply the following attribute to get a specific object:
  name                  - Optional. A DTC LBDN name in a string format.
  comment               - Optional. A DTC LBDN comment.
  fqdn                  - Optional. A fully qualified domain name (FQDN).
  extattrs              - Optional. A hash reference containing extensible attributes.
  extensible_attributes - Optional. A hash reference that contains extensible attributes.
  status_member         - Optional. A member that provides the object health status. The default is Grid.
Example
 my @retrieved_objs = $session->get(
     object => 'Infoblox::DTC::LBDN',
     name   => 'load_bal',
     fqdn   => 'lb.com'
 );
 my @retrieved_objs = $session->get(
     object => 'Infoblox::DTC::LBDN',
     extensible_attributes => { 'Site' => 'Santa Clara' }
 );

Infoblox::Session->modify( )

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

Example
 #Use method to modify the comment.
 $lbdn->comment('this is a modified comment');
 #Submit modification
 my $response = $session->modify($lbdn);

Infoblox::Session->remove( )

Use this method to remove an object from the Infoblox appliance. See Infoblox::Session->remove() for parameters and return values.

To remove a specific object, first use get() or search() to retrieve the specific object, and then submit this object for removal.

Example
 #Get the objects with the same name
 my @retrieved_objs = $session->get(
     object => 'Infoblox::DTC::LBDN',
     name   => 'load_bal',
 );
 #Find the desired object from the retrieved list.
 my $desired_lbdn = $retrieved_objs[0];
 #Submit for removal
 my $response = $session->remove($desired_lbdn);

Infoblox::Session->search( )

Use this method to search for objects in the Infoblox appliance. See Infoblox::Session->search() for parameters and return values.

Key Reference
 Apply the following attribute to get a specific object:
  name                  - Optional. A DTC LBDN name in a string format.
  comment               - Optional. A DTC LBDN comment.
  fqdn                  - Optional. A fully qualified domain name (FQDN).
  extattrs              - Optional. A hash reference containing extensible attributes.
  extensible_attributes - Optional. A hash reference that contains extensible attributes.
  status_member         - Optional. A member that provides the object health status. The default is Grid.
Example
 my @retrieved_objs = $session->search(
     object => 'Infoblox::DTC::LBDN',
     name   => 'load_b.*',
     fqdn   => 'lb.*'
 );
 my @retrieved_objs = $session->search(
     object => 'Infoblox::DTC::LBDN',
     extensible_attributes => { 'Site' => 'Santa Clara' }
 );


METHODS

This section describes all the methods that you can use to set or retrieve the attribute values of the object.

auth_zones( )

Use this method to set or retrieve a list of authoritative zones the DTC LBDN is linked to.

Note that two different DTC LBDNs cannot be linked to the same zone if their patterns overlap.

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

Parameter

The valid value is an array containing Infoblox::DNS::Zone objects.

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 auth_zones value
 my @auth_zones = $lbdn->auth_zones();
 #modify auth_zones value
 $lbdn->auth_zones([$zone1, $zone2]);

comment( )

Use this method to set or retrieve a descriptive comment.

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

Parameter

Desired comment in string format (UTF-8) with a maximum of 256 bytes.

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 comment value
 my $comment = $lbdn->comment();
 #modify comment value
 $lbdn->comment('desired comment');

disable( )

Use this method to enable or disable a DTC LBDN object.

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

Parameter

Specify 'true' to disable an DTC LBDN object or 'false' to enable it.

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 disable value
 my $disable = $lbdn->disable();
 #modify disable value
 $lbdn->disable('true');

extattrs( )

Use this method to set or retrieve the extensible attributes associated with a DTC LBDN object.

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

Parameter

Valid value is a hash reference containing the names of extensible attributes and their associated values (Infoblox::Grid::Extattr objects).

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 extattrs value
 my $ref_extattrs = $lbdn->extattrs();
 #Modify extattrs
 $lbdn->extattrs({ 'Site' => $extattr1, 'Administrator' => $extattr2 });

extensible_attributes( )

Use this method to set or retrieve the extensible attributes associated with a DTC LBDN object.

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

Parameter

For valid values for extensible attributes, see Infoblox::Grid::ExtensibleAttributeDef/Extensible Attribute Values.

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 extensible attributes
 my $ref_extensible_attributes = $lbdn->extensible_attributes();
 #Modify extensible attributes
 $lbdn->extensible_attributes({'Site' => 'Santa Clara', 'Administrator' => ['Peter', 'Tom']});

health( )

Use this method to retrieve DTC LBDN health information. This is a read-only attribute.

Parameter

None

Returns

The valid return value is an Infoblox::DTC::Health object.

Example
 #get health value
 my $health = $lbdn->health();

lb_method( )

Use this method to set or retrieve a DTC LBDN load balancing method.

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

Parameter

The valid values are 'GLOBAL_AVAILABILITY', 'RATIO', 'ROUND_ROBIN' and 'TOPOLOGY'.

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 lb_method value
 my $lb_method = $lbdn->lb_method();
 #modify lb_method value
 $lbdn->lb_method('RATIO');

name( )

Use this method to set or retrieve the DTC LBDN name.

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

Parameter

The valid value is a desired name in a 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 name value
 my $name = $lbdn->name();
 #modify name value
 $lbdn->name('load_bal1');

override_ttl( )

The override_ttl attribute controls whether the TTL value in the object is used, instead of the Grid default.

The override_ttl attribute can be specified explicitly. It is also set implicitly when ttl 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 override_ttl flag or 'false' to disable it. 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_ttl value
 my $override_ttl = $lbdn->override_ttl();
 #modify override_ttl value
 $lbdn->override_ttl('true');

patterns( )

Use this method to set or retrieve an array of DNS FQDN patterns. The patterns are used to match DNS query names processed by the DTC LBDN.

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

Parameter

The valid value is an array of FQDN patterns 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 patterns value
 my @patterns = $lbdn->patterns();
 #modify patterns value
 $lbdn->patterns(['???'.domain.com', '*.test.com', 'test.domain.com']);
 

persistence( )

Use this method to set or retrieve the maximum time (in seconds) for which client specific DTC LBDN responses are cached.

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

Parameter

The valid value is an unsigned integer. Zero specifies no caching.

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 persistence value
 my $persistence = $lbdn->persistence();
 #modify persistence value
 $lbdn->persistence(5);

pools( )

Use this method to set or retrieve the list of pools the DTC LBDN is linked to.

Note that a DTC LBDN linked to a zone must contain at least one enabled pool if lb_method is set to anything other than 'TOPOLOGY'.

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

Parameter

The valid value is an array of Infoblox::DTC::Pool::Link objects.

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 pools value
 my @pools = $lbdn->pools();
 #modify pools value
 $lbdn->pools([$pool_link1, $pool_link2]);

priority( )

Use this method to set or retrieve the LBDN pattern match priority for "overlapping" DTC LBDN objects.

LBDNs are "overlapping" if they are simultaneously assigned to a zone and have patterns that can match the same FQDN. The matching LBDN with highest priority (lowest ordinal) will be used.

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

Parameter

The valid value is an unsigned integer between 1 and 3. The default is 3.

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 priority value
 my $priority = $object->priority();
 #Modify priority value
 $object->priority(3);

topology( )

Use this method to set or retrieve topology rules for the 'TOPOLOGY' load balancing method.

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

Parameter

The valid value is an Infoblox::DTC::Topology 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 topology value
 my $topology = $lbdn->topology();
 #modify topology value
 $lbdn->topology($topology);

ttl( )

Use this method to set a TTL value.

Setting this method to a defined value implicitly sets the override_ttl method to 'true'. Setting the parameter to undefined causes the appliance to use the Grid default and automatically resets the override_ttl attribute to 'false'.

Note that when ttl is set to a defined value and override_ttl is set to 'false', the last operation takes precedence. Thus the sequence $object->ttl(10); $object->override_ttl('false'); will set override_ttl to 'false', and the sequence $object->override_ttl('false'); $object->ttl(10); will result in override_ttl='true'.

Parameter

The valid value is an unsigned integer.

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 ttl value
 my $ttl = $lbdn->ttl();
 #modify ttl value
 $lbdn->ttl(10);

types( )

Use this method to set or retrieve the list of record types supported by LBDN.

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

Parameter

The valid valid is an array reference that contains any of the following values: 'A', 'AAA', 'NAPTR', 'CNAME'.

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 types value
 my $types = $lbdn->types();
 #modify types value
 $lbdn->types(['NAPTR']);


AUTHOR

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


SEE ALSO

Infoblox::Session, Infoblox::Session->add(), Infoblox::Session->get(), Infoblox::Session->modify(), Infoblox::Session->remove(), Infoblox::Session->search(), Infoblox::Grid::Extattr, Infoblox::Grid::ExtensibleAttributeDef/Extensible Attribute Values, Infoblox::DTC::Health, Infoblox::DTC::Pool::Link, Infoblox::DTC::Topology.


COPYRIGHT

Copyright (c) 2017 Infoblox Inc.