Infoblox::Grid::MSServer - Microsoft Grid Server object.


NAME

Infoblox::Grid::MSServer - Microsoft (r) Grid Server object.


DESCRIPTION

A grid Microsoft DNS Server object is a single Microsoft DNS server that is managed by a grid member.


CONSTRUCTOR

 my $ms_member = Infoblox::Grid::MSServer->new(
     address                  => $ip_or_fqdn,                                   #Required
     ad_sites                 => $ad_sites,                                     #Optional
     ad_user                  => $ad_user,                                      #Optional
     comment                  => $string,                                       #Optional / Default value is empty
     disable                  => "true" | "false"                               #Optional / Default value is "false"
     extattrs                 => { $string => $extattr, ... },                  #Optional / Default is undefined
     extensible_attributes    => { $string => $string | $num,
                                   $string => [ $string | $num, ... ], ... },   #Optional / Default is undefined
     login                    => $string,                                       #Required
     password                 => $string,                                       #Optional / Default value is empty
     managing_member          => $Member,                                       #Optional / Default value is empty
     read_only                => "true" | "false",                              #Optional / Default value is "true"
     synchronization_interval => $num,                                          #Optional / Default value is 2
     logging_mode             => "minimum" | "normal" | "advanced" | "full",    #Optional / Default value is "normal"
     network_view             => $NetworkView,                                  #Optional / Default is "default" network view
     dns_view                 => $DnsView,                                      #Optional / Default is "default" view
     log_destination          =>  "SYSLOG" | "MSLOG",                           #Optional / Default is undefined
     override_log_destination => "true" | "false",                              #Optional / Default value is "false"
     max_connection           => $num,                                          #Optional / Default is undefined
     override_max_connection  => "true" | "false",                              #Optional / Default value is "false"
     rpc_timeout              => $num,                                          #Optional / Default is undefined
     override_rpc_timeout     => "true" | "false",                              #Optional / Default value is "false"
 );

You cannot set both extattrs and extensible_attributes attributes at the same time.


Infoblox::DNS::Zone Considerations

The following apply to zones assigned to Microsoft DNS servers:

Methods with no effect

The following methods have no effect on a Microsoft DNS server that is assigned to a zone:

allow_transfer()
allow_query( )
allow_update( )
allow_update_forwarding( )
bind_check_names_policy( )
create_underscore_zones( )
disable_forwarding( )
forward_only( )
forward_to( )
import_from( )
override_delegated_ttl( )
override_grid_zone_timer( )
override_grid_email( )
override_serial_number( )
prefix( )
remove_sub_zones( )
soa_negative_ttl( )
shared_record_groups( )

Values set or retrieved using the member that manages the Microsoft DNS server apply only to that grid member if it is assigned to a zone.

Applicable methods

The following methods apply to any grid member or Microsoft DNS server assigned to the zone:

comment( )
delegated_ttl( )
disable( )
email( )
extensible_attributes( )
host_name_restriction_policy( )
locked( )
name( )
ns_group( )
multiple_primaries( )
secondaries( )
soa_default_ttl( )
soa_expire( )
member_soa_mnames( )
soa_refresh( )
soa_retry( )
member_soa_serials( )
stub_from( )
stub_members( )
zone( )


Infoblox::DNS considerations

The following objects cannot be used with a Microsoft DNS Server object or with a Zone object whose primary server is a Microsoft DNS Server object:

Infoblox::DNS::BulkHost
Infoblox::DNS::DnssecTrustedKey
Infoblox::DNS::Host
Infoblox::DNS::SRG
Infoblox::DNS::RootNameServer
Infoblox::DNS::Sortlist
Infoblox::DNS::TSIGKey
Infoblox::DNS::Record
DNAME (only with Windows Server 2008 and later)
DS, RRSIG, DNSKEY, NSEC, NSEC3, NSEC3PARAM (read-only on Windows Server 2008 R2 and later)


Infoblox::Grid::DNS considerations

The following methods can be applied to DNS zones managed by a Microsoft DNS server:

default_ttl( )
email( )
host_name_restriction_policy( )
zone_deletion_double_confirm( )

The following methods have no effect on any zone managed by a Microsoft DNS server:

allow_bulkhost_ddns( )
allow_gss_tsig_zone_updates( )
allow_transfer( )
allow_query( )
allow_recursive_query( )
allow_update( )
bind_check_names_policy( )
blackhole_list( )
bulk_host_name_template( )
bulk_host_name_templates( )
dnssec_enabled( )
dnssec_expired_signatures_enabled( )
dnssec_ksk_algorithm()
dnssec_ksk_rollover_interval()
dnssec_ksk_size()
dnssec_signature_expiration( )
dnssec_validation_enabled( )
dnssec_trusted_keys( )
dnssec_zsk_algorithm()
dnssec_zsk_rollover_interval()
dnssec_zsk_size()
enable_blackhole( )
expire_after( )
forward_only( )
forward_updates( )
forwarders( )
logging_categories( )
logging_facility( )
member_secondary_notify( )
negative_ttl( )
notify_source_port( )
nsgroup_default( )
nsgroups( )
query_source_port( )
record_name_policies( )
recursive_query_list( )
refresh_timer( )
retry_timer( )
rootNS( )
sortlist( )
transfer_excluded_servers( )
transfer_format( )


SESSION METHODS

This section describes all the methods in an Infoblox::Session module that you can apply to a grid member 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 $grid_msserver = Infoblox::Grid::MSServer->new(
                                              address                  => '10.0.0.1',
                                              comment                  => 'This is an MS DNS Server',
                                              disable                  => 'true',
                                              extensible_attributes    => { Site => 'Main Office'},
                                              login                    => 'user',
                                              password                 => 'password',
                                              managing_member          => 'managing.member.com',
                                              read_only                => 'false',
                                              synchronization_interval => 5,
                                              logging_mode             => 'minimum',
     );
 #Submit for addition
 my $response = $session->add( $grid_msserver );

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 References
 Apply the following attributes to get a specific grid member object:
  address - Optional. A member address or name in FQDN format.
  comment - Optional. A comment in string format
  read_only - Optional. A boolean value
  managing_member - Optional. A name in FQDN format.
  network_view  -  Optional. The network view served by the member.
  dns_view -  Optional. The DNS view served by the member.
  extattrs - Optional. A hash reference containing extensible attributes.
  extensible_attributes - Optional. A hash reference containing extensible attributes.
Example
 my @retrieved_objs = $session->get(
     object  => "Infoblox::Grid::MSServer",
     address => "10.0.0.1");

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 this method to modify the comment of a Microsoft DNS server managed by the grid.
 $grid_msserver->comment("This is modified object");
 # Submit modification
 my $response = $session->modify( $grid_msserver );

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

Infoblox::Session->search( )

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

Key References

Apply the following attributes to search for a Microsoft DNS Server object

  address - Optional. A member address or name in FQDN format (regular expression).
  comment - Optional. A comment in string format (regular expression).
  read_only - Optional. A boolean value
  managing_member - Optional. The FQDN of the grid member that manages the Microsoft DNS server?
  network_view  -  Optional. The network view served by the member.
  dns_view -  Optional. The DNS view served by the member.
  extattrs - Optional. A hash reference containing extensible attributes.
  extensible_attributes   - Optional. A hash reference that contains extensible attributes.

For more information about searching extensible attributes, see Infoblox::Grid::ExtensibleAttributeDef/Searching Extensible Attributes.

Example
 # search for all matching grid msserver objects
 my @retrieved_objs = $session->search(
     object  => "Infoblox::Grid::MSServer",
     extensible_attributes => { Site => 'Local'},
     );


METHODS

This section describes all the methods that you can use to configure and retrieve the attribute values of a Microsoft DNS server.

address()

Retrieve or set the IP address or FQDN of the Microsoft DNS server.

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

Parameter

The Microsoft DNS server name in FQDN format or IPV4 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 address
 my $address = $msserver->address();

ad_domain( )

Use this method to retrieve the Active Directory domain name of the Microsoft Server. 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 ad_domin value
 my $ad_domain = $object->ad_domain();

ad_sites()

Use this method to set or retrieve structure containing Active Directory Sites information.

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

Parameter

The valid value is an Infoblox::Grid::MSServer::AdSites 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 ad_sites value
 my $ad_sites = $msserver->ad_sites();
 #Modify ad_sites value
 my $res = $msserver->ad_sites($ad_sites);

ad_user()

Use this method to set or retrieve the object that contains Active Directory User synchronization information.

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

Parameter

The valid value is an Infoblox::Grid::MSServer::AdUser 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 ad_user value
 my $ad_user = $msserver->ad_user();
 #Modify ad_user value
 my $res = $msserver->ad_user($ad_user);

comment()

Retrieve or set a user-defined string related to this Microsoft DNS server.

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

Parameter

Desired comment in string format 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
  my $comment = $msserver->comment();
  #Modify comment
  $msserver->comment("Modifying the MS DNS server comment");

disable()

Retrieve or set the disable() flag of this Microsoft DNS server.

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

Parameter

Specify "true" to set the disable 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 disable
  my $disable = $msserver->disable();
  #Modify disable
  $msserver->disable("true");

login()

Retrieve or set the login name that the grid member uses to connect to the Microsoft DNS server.

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

When setting a value that requires a domain name, prepend the domain information followed by a backslash to the username: "domain\username".

Parameter

The valid value is a string that contains the login 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 login
  my $login = $msserver->login();
  #Modify login
  $msserver->login("newuser");

password()

Set the password that the grid member uses to connect to the Microsoft DNS server. This field is used only if the login field for this member is defined. This is a write-only attribute.

This field can not be retrieved.

Parameter

The valid value is a string that contains the password.

Returns

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

Example
  #Set the password
  $msserver->password("iG&ojG97Y");

network_view()

Retrieve or set the name of the network view associated with this member.

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

Parameter

The valid value is a string that contains the name of the network view associated with this member.

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 network_view
  my $network_view = $msserver->network_view();
  #Modify network_view
  $msserver->network_view("external");

dns_view()

Retrieve or set the name of the DNS view that applies to this Microsoft DNS server. If this field is set to undefined, the default view is used. The DNS view must be set to a DNS view linked to the Microsoft DNS server network view.

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

Parameter

The valid value is a string that contains the name of the DNS view associated with the Microsoft DNS server

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 dns_view
  my $dns_view = $msserver->dns_view();
  #Modify dns_view
  $msserver->dns_view("external");

log_destination( )

Use this method to direct the logging of synchronization messages to the syslog or mslog.

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

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

Parameter

Valid values are "SYSLOG" and "MSLOG".

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 log_destination value
 my $log_destination = $msserver->log_destination();
 #Modify log_destination value
 $msserver->log_destination("SYSLOG");

max_connection( )

Use this method to set or retrieve the maximum number of connections to a Microsoft server.

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

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

Parameter

Valid values are integers between 2 and 40 inclusive.

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 max_connection value
 my $max_connection = $msserver->max_connection();
 #Modify max_connection value
 $msserver->max_connection(20);

managing_member()

Retrieve or set the grid member responsible for the synchronization of this Microsoft DNS server.

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

Parameter

The valid value is a string that contains the name of the grid member.

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 managing_member
  my $managing_member = $msserver->managing_member();
  #Modify managing_member
  $msserver->managing_member("example.member.com");

override_log_destination( )

The override_log_destination attribute controls whether the log_destination method values of the Microsoft Server are used, instead of the Grid default.

The override_log_destination attribute can be specified explicitly. It is also set implicitly when log_destination 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 log_destination. Set the parameter to "false" to inherit the Grid-level setting for log_destination. 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_log_destination
 my $override_log_destination = $msserver->override_log_destination();
 #Modify override_log_destination
 $msserver->override_log_destination("true");

override_max_connection( )

The override_max_connection attribute controls whether the max_connection method values of the Microsoft Server are used, instead of the Grid default.

The override_max_connection attribute can be specified explicitly. It is also set implicitly when max_connection 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 max_connection. Set the parameter to "false" to inherit the grid-level setting for max_connection. 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_max_connection
 my $override_max_connection = $msserver->override_max_connection();
 #Modify override_max_connection
 $msserver->override_max_connection("true");

override_rpc_timeout( )

The override_rpc_timeout attribute controls whether the rpc_timeout method values of the Microsoft Server are used, instead of the Grid default.

The override_rpc_timeout attribute can be specified explicitly. It is also set implicitly when rpc_timeout 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 rpc_timeout. Set the parameter to "false" to inherit the grid-level setting for rpc_timeout. 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_rpc_timeout
 my $override_rpc_timeout = $msserver->override_rpc_timeout();
 #Modify override_rpc_timeout
 $msserver->override_rpc_timeout("true");

read_only()

Retrieve or set the synchronization mode of this Microsoft DNS server.

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

Setting the read_only mode to true synchronizes all data from the Microsoft DNS server to the grid and forbids any change on the grid that could be synchronized to the Microsoft DNS server.

Parameter

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

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 read_only
  my $read_only = $msserver->read_only();
  #Modify read_only
  $msserver->read_only("false");

root_ad_domain( )

Use this method to retrieve the Active Directory root domain name of the Microsoft Server. 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 ad_domin value
 my $root_ad_domain = $object->root_ad_domain();

rpc_timeout( )

Use this method to set or retrieve the timeout value in seconds for RPC connections to Microsoft Server.

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

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

Parameter

Valid values are integers between 0 and 65535 inclusive.

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 rpc_timeout value
 my $rpc_timeout = $msserver->rpc_timeout();
 #Modify rpc_timeout value
 $msserver->rpc_timeout(10);

synchronization_interval()

Retrieve or set the synchronization interval of this Microsoft DNS server.

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

The synchronization interval controls how often data on the Microsoft DNS server is synchronized with the grid. The value is specified in minutes.

Parameter

The valid value is a number that specifies the synchronization interval in minutes. The default value is 2 minutes.

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 synchronization_interval
  my $synchronization_interval = $msserver->synchronization_interval();
  #Modify synchronization_interval
  $msserver->synchronization_interval(5);

logging_mode()

Retrieve or set the synchronization logging verbosity of this Microsoft DNS server.

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

Parameter

The valid value is "minimum", "normal", "advanced", or "full". The default value is "normal".

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 logging_mode
  my $logging_mode = $msserver->logging_mode();
  #Modify logging_mode
  $msserver->logging_mode("advanced");

version()

Retrieve the version of this Microsoft DNS server. The returned version is a string, such as "Microsoft Windows Server 2003".

Returns

The method returns the attribute value.

Example
  #Get version
  my $version = $msserver->version();

is_AD()

Retrieve the Active Directory flag of the Microsoft DNS server. The method returns "true" if the Microsoft DNS server has Active Directory capabilities or "false" if it does not.

Returns

The method returns the attribute value.

Example
  #Get is_AD
  my $is_AD = $msserver->is_AD();

extattrs( )

Use this method to set or retrieve the extensible attributes associated with a Microsoft DNS server object.

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

extensible_attributes( )

Use this method to set or retrieve the extensible attributes associated with a Microsoft DNS server.

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


SAMPLE CODE

The following sample code demonstrates the different functions that can be applied to an object such as add, get, modify, search and remove. This sample also includes error handling for the operations.

#Preparation prior to getting and modifying a grid msserver object

 use strict;
 use Infoblox;
 #refers to Infoblox Appliance IP address
 my $host_ip = "192.168.1.2";
 #Create a session to the Infoblox appliance
 my $session = Infoblox::Session->new(
     master   => $host_ip,
     username => "admin",
     password => "infoblox"
 );
 unless ($session) {
        die("Construct session failed: ",
                Infoblox::status_code() . ":" . Infoblox::status_detail());
 }
 print "Session created successfully\n";
 #Create a grid member object
 my $grid_member = Infoblox::Grid::Member->new(
     name          => "hostname.com",
     ipv4addr      => "3.0.0.2",
     mask          => "255.0.0.0",
     gateway       => "3.0.0.1",
     comment       => "Script Generated"
     );
 unless ($grid_member) {
        die("Construct grid member object failed: ",
                Infoblox::status_code() . ":" . Infoblox::status_detail());
 }
 print "Grid member object created successfully\n";
 #Adding the member object to appliance through session
 my $response = $session->add( $grid_member );
 unless ($response) {
     die("Add grid member failed: ",
            $session->status_code() . ":" . $session->status_detail());
 }
 print"Grid member added successfully \n";
 my $msserver = Infoblox::Grid::MSServer->new(
                                              address                  => '10.0.0.1',
                                              comment                  => 'basic member',
                                              disable                  => 'true',
                                              extensible_attributes    => { Site => 'Local'},
                                              login                    => 'user',
                                              password                 => 'password',
                                              managing_member          => 'hostname.com',
                                              read_only                => 'false',
                                              synchronization_interval => 5,
                                              logging_mode             => 'minimum',
                                             );
 unless ($msserver) {
        die("Construct grid MS DNS server object failed: ",
                Infoblox::status_code() . ":" . Infoblox::status_detail());
 }
 print "Grid MS DNS server object created successfully\n";
 #Adding the member object to appliance through session
 $response = $session->add( $msserver );
 unless ($response) {
     die("Add grid MS DNS server failed: ",
            $session->status_code() . ":" . $session->status_detail());
 }
 print"Grid MS DNS server added successfully \n";

#Search for a grid Microsoft DNS server object

  my @retrieved_objs = $session->search(
      object => "Infoblox::Grid::MSServer",
      comment => "basic.*");
  my $object = $retrieved_objs[0];
  unless ($object) {
         die("Search grid MS DNS server object failed: ",
                 $session->status_code() . ":" . $session->status_detail());
  }
  print "Search grid MS DNS server object found at least 1 matching entry\n";

#Get and modify the msserver object

 #Get grid member through session
 my @retrieved_objs = $session->get(
     object => "Infoblox::Grid::MSServer",
     address => "10.0.0.1"
     );
 my $msserver = $retrieved_objs[0];
 unless ($msserver) {
     die("Get grid MS DNS server object failed: ",
            $session->status_code() . ":" . $session->status_detail());
 }
 print"Get grid MS DNS server successful \n";
 # Modify one of the attributes of the selected Microsoft DNS server.
 $msserver->comment("Modified MS DNS server object");
 #Applying the changes
 $session->modify($msserver)
    or die("Modify grid MS DNS server failed",
             $session->status_code() . ":" . $session->status_detail());
 print"Grid MS DNS server modified successfully \n";

#Remove the created objects object

 #Get grid member through session
 my @retrieved_objs = $session->get(
     object => "Infoblox::Grid::MSServer",
     address => "10.0.0.1"
     );
 my $desired_msserver = $retrieved_objs[0];
 unless ($desired_msserver) {
     die("Get grid MS DNS server object failed: ",
            $session->status_code() . ":" . $session->status_detail());
 }
 print"Get grid member successful \n";
 #Submit the object for removal
 $session->remove( $desired_msserver )
     or die("Remove grid MS DNS server failed",
            $session->status_code() . ":" . $session->status_detail());
 print"Grid MS DNS server removed successfully \n";
 #Get grid member through session
 my @retrieved_objs = $session->get(
     object => "Infoblox::Grid::Member",
     name   => "hostname.com"
     );
 my $desired_grid_member = $retrieved_objs[0];
 unless ($desired_grid_member) {
     die("Get grid member object failed: ",
            $session->status_code() . ":" . $session->status_detail());
 }
 print"Get grid member successful \n";
 #Submit the object for removal
 $session->remove( $desired_grid_member )
     or die("Remove grid member failed",
            $session->status_code() . ":" . $session->status_detail());
 print"Grid member removed successfully \n";
 ####PROGRAM ENDS####


AUTHOR

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


SEE ALSO

Infoblox::Session, Infoblox::Grid::MSServer::AdSites, Infoblox::Grid::MSServer::AdUser.


COPYRIGHT

Copyright (c) 2017 Infoblox Inc.