Infoblox::DTC::Pool - a DTC Pool object.


NAME

Infoblox::DTC::Pool - a DTC Pool object.


DESCRIPTION

A DTC Pool object.


CONSTRUCTOR

 my $pool = Infoblox::DTC::Pool->new(
    name                    => $string,,                                                              #Required
    lb_preferred_method     => 'ALL_AVAILABLE' | 'GLOBAL_AVAILABILITY' | 'RATIO' |
                               'ROUND_ROBIN' | 'TOPOLOGY' | 'DYNAMIC_RATIO',                          #Required
    disable                 => 'true' | 'false',                                                      #Optional / Default is 'false'
    comment                 => $string,                                                               #Optional / Default is undefined
    lb_preferred_topology   => $topology,                                                             #Optional / Default is undefined
    lb_alternate_method     => 'ALL_AVAILABLE' | 'GLOBAL_AVAILABILITY' | 'RATIO' |
                               'ROUND_ROBIN' | 'TOPOLOGY' | 'DYNAMIC_RATIO',                          #Optional / Default is undefined
    lb_alternate_topology   => $topology,                                                             #Optional / Default is undefined
    availability            => 'ANY' | 'QUORUM' | 'ALL',                                              #Optional / Default is undefined
    quorum                  => $uint,                                                                 #Optional / Default is undefined
    ttl                     => $uint,                                                                 #Optional / Default is undefined
    override_ttl            => 'true' | 'false',                                                      #Optional / Default is 'false'
    monitors                => [$monitor1, $monitor2, ...],                                           #Optional / Default is empty list
    servers                 => [$server1, $server2, ...],                                             #Optional / Default is empty list
    dynamic_ratio_preferred => $ratio_setting,                                                        #Optional / Default is undefined
    dynamic_ratio_alternate => $ratio_setting,                                                        #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 Pool 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 $pool = Infoblox::DTC::Pool->new(
    name  => 'pool1',
    lb_preferred_method => 'RATIO',
 );
 #submit for addition
 my $response = $session->add($pool);

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 Pool name in a string format.
  comment               - Optional. A DTC Pool comment.
  extattrs              - Optional. A hash reference containing extensible attributes.
  extensible_attributes - Optional. A hash reference that contains extensible attributes.
  status_member         - Optional. A member which provides object health status, default is Grid.
Example
 my @retrieved_objs = $session->get(
     object => 'Infoblox::DTC::Pool',
     name   => 'pool1',
 );
 my @retrieved_objs = $session->get(
     object => 'Infoblox::DTC::Pool',
     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.
 $pool->comment('this is a modified comment');
 #Submit modification
 my $response = $session->modify($pool);

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::Pool',
     name   => 'pool1',
 );
 #Find the desired object from the retrieved list.
 my $desired_pool = $retrieved_objs[0];
 #Submit for removal
 my $response = $session->remove($desired_pool);

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 Pool name in a string format.
  comment               - Optional. A DTC Pool comment.
  extattrs              - Optional. A hash reference containing extensible attributes.
  extensible_attributes - Optional. A hash reference that contains extensible attributes.
  status_member         - Optional. A member which provides object health status, default is Grid.
Example
 my @retrieved_objs = $session->get(
     object => 'Infoblox::DTC::Pool',
     name   => 'pool1',
 );
 my @retrieved_objs = $session->get(
     object => 'Infoblox::DTC::Pool',
     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.

availability( )

Use this method to set or retrieve an DTC Pool resources availability status.

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

Parameter

The valid values are 'ALL', 'ANY' and 'QUORUM'.

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 availability value
 my $availability = $pool->availability();
 #modify availability value
 $pool->availability('ANY');

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

The valid value is a 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 = $pool->comment();
 #modify comment value
 $pool->comment('desired comment');

dynamic_ratio_alternate( )

Use this method to set or retrieve the alternate dynamic ratio load balancing settings.

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::Pool::DynamicRatioSetting 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 dynamic_ratio_alternate value
 my $dynamic_ratio_alternate = $pool->dynamic_ratio_alternate();
 #Construct dynamic_ratio_alternate value
 my $dynamic_ratio = Infoblox::DTC::Pool::DynamicRatioSetting->new(
     method                => 'ROUND_TRIP_DELAY',
     invert_monitor_metric => 'true',
 );
 #modify dynamic_ratio_alternate value
 $pool->dynamic_ratio_alternate($dynamic_ratio);

dynamic_ratio_preferred( )

Use this method to set or retrieve the preferred dynamic ratio load balancing settings.

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::Pool::DynamicRatioSetting 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 dynamic_ratio_preferred value
 my $dynamic_ratio_preferred = $pool->dynamic_ratio_preferred();
 #Construct dynamic_ratio_preferred value
 my $dynamic_ratio = Infoblox::DTC::Pool::DynamicRatioSetting->new(
     method                => 'ROUND_TRIP_DELAY',
     invert_monitor_metric => 'true',
 );
 #modify dynamic_ratio_preferred value
 $pool->dynamic_ratio_preferred($dynamic_ratio);

disable( )

Use this method to enable or disable a DTC Pool.

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

Parameter

Specify 'true' to disable a DTC Pool or 'false' to enable 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 disable value
 my $disable = $pool->disable();
 #modify disable value
 $pool->disable('true');

extattrs( )

Use this method to set or retrieve the extensible attributes associated with a DTC Pool 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 = $pool->extattrs();
 #Modify extattrs
 $pool->extattrs({ 'Site' => $extattr1, 'Administrator' => $extattr2 });

extensible_attributes( )

Use this method to set or retrieve the extensible attributes associated with a DTC Pool 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 = $pool->extensible_attributes();
 #Modify extensible attributes
 $pool->extensible_attributes({'Site' => 'Santa Clara', 'Administrator' => ['Peter', 'Tom']});

health( )

Use this method to retrieve a DTC Pool 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 = $pool->health();

lb_alternate_method( )

Use this method to set or retrieve the alternate load balancing method for the DTC Pool object.

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

Parameter

The valid values are 'ALL_AVAILABLE', 'DYNAMIC_RATIO', 'NONE', '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_alternate_method value
 my $lb_alternate_method = $pool->lb_alternate_method();
 #modify lb_alternate_method value
 $pool->lb_alternate_method('RATIO');

lb_alternate_topology( )

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

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

Not that this field will be retrieved from the appliance only if alternate load balancing method is 'TOPOLOGY'.

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 lb_alternate_topology value
 my $lb_alternate_topology = $pool->lb_alternate_topology();
 #modify lb_alternate_topology value
 $pool->lb_alternate_topology($lb_alternate_topology);

lb_preferred_method( )

Use this method to set or retrieve the preferred load balancing method for the DTC Pool object.

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

Parameter

The valid values are 'ALL_AVAILABLE', 'DYNAMIC_RATIO', '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_preferred_method value
 my $lb_preferred_method = $pool->lb_preferred_method();
 #modify lb_preferred_method value
 $pool->lb_preferred_method('RATIO');

lb_preferred_topology( )

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

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.

Not that this field will be retrieved from the appliance only if preferred load balancing method is 'TOPOLOGY'.

Example
 #get lb_preferred_topology value
 my $lb_preferred_topology = $pool->lb_preferred_topology();
 #modify lb_preferred_topology value
 $pool->lb_preferred_topology($lb_preferred_topology);

monitors( )

Use this method to set or retrieve health monitors related to a DTC Pool object.

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

Parameter

The valid value is an array which contains following objects: Infoblox::DTC::Monitor::TCP, Infoblox::DTC::Monitor::ICMP, Infoblox::DTC::Monitor::SIP, Infoblox::DTC::Monitor::HTTP, Infoblox::DTC::Monitor::PDP.

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 monitors value
 my @monitors = $pool->monitors();
 #modify monitors value
 $pool->monitors([$monitor1, $monitor2]);

name( )

Use this method to set or retrieve a DTC Pool 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 = $pool->name();
 #modify name value
 $pool->name('pool1');

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 = $pool->override_ttl();
 #modify override_ttl value
 $pool->override_ttl('true');

quorum( )

Use this method to set or retrieve the number of monitors that must report the resource as 'up' for 'QUORUM' availability mode to be available.

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.

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 quorum value
 my $quorum = $pool->quorum();
 #modify quorum value
 $pool->quorum(20);

servers( )

Use this method to set or retrieve a list of DTC Servers linked to a DTC Pool.

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::Server::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 servers value
 my @servers = $pool->servers();
 #modify servers value
 $pool->servers([$server1, $server2]);

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


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::DynamicRatioSetting, Infoblox::DTC::Pool::Link, Infoblox::DTC::Server::Link, Infoblox::DTC::Topology, Infoblox::DTC::Monitor::TCP, Infoblox::DTC::Monitor::ICMP, Infoblox::DTC::Mo nitor::SIP, Infoblox::DTC::Monitor::HTTP, Infoblox::DTC::Monitor::PDP.


COPYRIGHT

Copyright (c) 2017 Infoblox Inc.