Infoblox::Grid::HostNameRewritePolicy - a structure for storing hostname rewrite policies.


NAME

Infoblox::Grid::HostNameRewritePolicy - a structure for storing hostname rewrite policies.


DESCRIPTION

An Infoblox::Grid::HostNameRewritePolicy object represents a hostname rewrite policy.


CONSTRUCTOR

  my $policy = Infoblox::Grid::HostNameRewritePolicy->new(
       name                  => $string,           # Required
       valid_characters      => $string,           # Required
       replacement_character => $string,           # Required
       is_grid_default       => "true" | "false",  # Optional / Default value is "false"
  );


MODULE METHODS

The following functions can be applied to an Infoblox::Grid::HostNameRewritePolicy object.

Infoblox::Grid::DHCP->protocol_hostname_rewrite_policies( )

Use this function to add or retrieve hostname rewrite policies. See Infoblox::Grid::DHCP->protocol_hostname_rewrite_policies() for parameters and return values.

Example
 #Get Grid DHCP object
 my @retrieved_objs = $session->get(
        object => "Infoblox::Grid::DHCP",
        grid   => "Infoblox"
 );
 my $griddhcp = $retrieved_objs[0];
 #Modify protocol_hostname_rewrite_policies
 my $policies = $griddhcp->protocol_hostname_rewrite_policies();
 push(@$policies, $policy);
 $griddhcp->protocol_hostname_rewrite_policies($policies);


METHODS

This section describes all the methods that can be used to configure and retrieve the attribute values of an Infoblox::Grid::HostNameRewritePolicy object.

is_grid_default( )

Use this method to set or retrieve the grid's default hostname rewrite policy.

Parameter

Specify "true" to set a policy as the grid default hostname rewrite policy 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 is_grid_default
 my $is_grid_default = $policy->is_grid_default();
 #Modify is_grid_default
 $policy->is_grid_default('true');

name( )

Use this method to set or retrieve the policy name.

Parameter

String with policy name.

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
 my $name = $policy->name();
 #Modify name
 $policy->name('new_policy');

replacement_character( )

Use this method to set or retrieve the replacement character.

Parameter

The replacement character.

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 replacement_character
 my $replacement_character = $policy->replacement_character();
 #Modify name
 $policy->replacement_character('-');

pre_defined( )

Use this method to retrieve a predefined hostname rewrite policy. This attribute is read-only.

Parameter

None.

Returns

The method returns the attribute value.

Example
 #Get pre_defined
 my $pre_defined = $policy->pre_defined();

valid_characters( )

Use this method to set or retrieve permitted characters for a hostname.

Parameter

String with permitted characters for a hostname.

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_characters
 my $valid_characters = $policy->valid_characters();
 #Modify valid_characters
 $policy->valid_characters('A-Z0-9_');


AUTHOR

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


SEE ALSO

Infoblox::Grid::DHCP, Infoblox::Grid::Member::DHCP


COPYRIGHT

Copyright (c) 2017 Infoblox Inc.