Infoblox::Grid::DNS::Nsgroup::DelegationMember - A delegation nameservers group.


NAME

Infoblox::Grid::DNS::Nsgroup::DelegationMember - A delegation nameservers group.


DESCRIPTION

When you configure a name server group, you can now create a set of external name servers as a delegation name server group and assign it to delegated zones. Specifying a single delegation name server group instead of configuring multiple name servers individually for delegated zones can significantly reduce configuration efforts.


CONSTRUCTOR

 my $object = Infoblox::Grid::DNS::Nsgroup::DelegationMember->new(
     name                  => $string,                                                              #Required
     delegation_servers    => [$nameserver1, $nameserver1, ...],                                    #Required
     comment               => $string,                                                              #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 an Infoblox::Session module that you can apply to a delegation members group object.

Infoblox::Session->add( )

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

Example
 #Construct an object
 my $object = Infoblox::Grid::DNS::Nsgroup::DelegationMember->new(
     name               => 'dlggroup',
     delegation_servers => [$nameserver1, $nameserver2],
 );
 #Submit for addition
 my $response = $session->add($object);

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 attributes to get a specific delegation member group object:
  comment               - Optional. The delegation member group comment in a string format.
  name                  - Optional. The delegation member group name in a string format.
  extattrs              - Optional. A hash reference containing extensible attributes.
  extensible_attributes - Optional. A hash reference containing extensible attributes.

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

Example
 my @retrieved_objs = $session->get(
     object => 'Infoblox::Grid::DNS::Nsgroup::DelegationMember',
     name   => 'dlggroup',
 );

Infoblox::Session->modify( )

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

Example
 #Modify comment value
 $object->comment('this is a modified comment');
 #Submit modification
 my $response = $session->modify($object);

Infoblox::Session->remove( )

Use this method to remove the 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 DHCP range object, and then submit this object for removal.

Example
 #Get the objects
 my @retrieved_objs = $session->get(
     object => 'Infoblox::Grid::DNS::Nsgroup::DelegationMember',
     name   => 'dlggroup',
 );
 #Find the desired object from the retrieved list
 my $desired_object = $retrieved_objs[0];
 #Submit for removal
 my $response = $session->remove($desired_object);

Infoblox::Session->search( )

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

Key References
 Apply the following attributes to search for the delegation member group object:
  comment               - Optional. The delegation member group comment in a string format (regexp).
  name                  - Optional. The delegation member group name in a string format (regexp).
  extattrs              - Optional. A hash reference containing extensible attributes.
  extensible_attributes - Optional. A hash reference containing extensible attributes.

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

Example
 # search for objects
 my @retrieved_objs = $session->search(
     object  => 'Infoblox::Grid::DNS::Nsgroup::DelegationMember',
     name    => '^dlg.*',
     comment => '.*comment',
 );
 # search for objects defining 'Santa Clara' for 'Site' extensible attribute
 my @retrieved_objs = $session->search(
     object                => 'Infoblox::Grid::DNS::Nsgroup::DelegationMember',
     extensible_attributes => {'Site' => 'Santa Clara'},
 );


METHODS

This section describes all the methods that you can use to configure and retrieve the attribute values of a delegation member group.

comment( )

Use this method to set or retrieve the delegation member group comment.

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

Parameter

The valid value is a desired comment 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 comment value
 my $comment = $object->comment();
 #Modify comment value
 $object->comment('dlg comment');

extattrs( )

Use this method to set or retrieve the extensible attributes associated with a delegation member group object.

Parameter

Valid value is a hash reference that contains 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 $extattrs = $object->extattrs();
 #Modify extattrs value
 $object->extattrs({'Site' => $extattr1, 'Administrator' => $extattr2});

extensible_attributes( )

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

delegation_servers( )

Use this method to set or retrieve the list of delegation servers.

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::DNS::Nameserver 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 delegation_servers value
 my $delegation_servers = $object->delegation_servers();
 #Modify delegation_servers value
 #Create nameserver object
 my $nameserver = Infoblox::DNS::Nameserver->new(
     name     => 'ns1.domain1.extra',
     ipv4addr => '5.5.5.5',
 );
 #Set delegation_servers value
 $object->delegation_servers([$nameserver]);

name( )

Use this method to set or retrieve the delegation member group 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 = $object->name();
 #Modify name value
 $object->name('dlgg1');


SAMPLE CODE

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

#Preparation prior to an Delegation Member Nsgroup object insertion

 #PROGRAM STARTS: Include all the modules that will be used
 use strict;
 use Infoblox;
 my ($session, $result);
 #Create a session to the Infoblox device
 $session = Infoblox::Session->new(
     master   => "192.168.1.2",
     username => "admin",
     password => "infoblox"
 );
 unless ($session) {
    die("Construct session failed: ",
        Infoblox::status_code() . ":" . Infoblox::status_detail());
 }
 print "Session created successfully\n";

#Create an Delegation Member Nsgroup object

 #Creating an external nameserver
 my $nameserver = Infoblox::DNS::Nameserver->new(
     name     => "ns1.domain0.external",
     ipv4addr => "5.5.5.5",
 );
 #Creating a delegation nsgroup object.
 my $dlg_nsg1 = Infoblox::Grid::DNS::Nsgroup::DelegationMember->new(
     name               => "dlg_group_1",
     delegation_servers => [$nameserver],
 );
 unless ($dlg_nsg1) {
    die("Construct Delegation Member Nsgroup failed: ",
        Infoblox::status_code() . ":" . Infoblox::status_detail());
 }
 print "Delegation Member Nsgroup object constructed successfully\n";

#Add the Nsgroup object

 $result = $session->add($dlg_nsg1);
 
 unless ($result) {
     die("Add Delegation Member Nsgroup to session failed: ",
         $session->status_code() . ":" . $session->status_detail());
 }
 print "Delegation Member Nsgroup object created successfully\n";

#Search and Modify the Nsgroup object

 my @result_array = $session->search(
     object => "Infoblox::Grid::DNS::Nsgroup::DelegationMember",
     name   => "dlg_.*",
 );
 my $object = $result_array[0];
 unless ($object) {
    die("Search for Delegation Member Nsgroup failed: ",
        $session->status_code() . ":" . $session->status_detail());
 }
 $result = $object->comment("delegation member");
 unless ($result) {
     die("Modify Delegation Member Nsgroup failed: ",
         Infoblox::status_code() . ":" . Infoblox::status_detail());
 }
 $result = $session->modify($object);
 unless ($result) {
     die("Submit modification to the session failed: ",
         $session->status_code() . ":" . $session->status_detail());
 }
 print "Delegation Member Nsgroup object modified successfully\n";

#Remove a Nsgroup object

 my @result_array = $session->get(
     object => "Infoblox::Grid::DNS::Nsgroup::DelegationMember",
     name   => "dlg_group_1",
 );
 my $object = $result_array[0];
 unless ($object) {
    die("Get Delegation Member Nsgroup failed: ",
        $session->status_code() . ":" . $session->status_detail());
 }
 $result = $session->remove($object);
 unless ($result) {
     die("Remove Nsgroup failed: ",
         $session->status_code() . ":" . $session->status_detail());
 }
 print "Delegation Member Nsgroup object removed successfully\n";
 ####PROGRAM ENDS####


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::DNS::Nameserver, Infoblox::Grid::ExtensibleAttributeDef/Extensible Attribute Values, Infoblox::Grid::Extattr


COPYRIGHT

Copyright (c) 2017 Infoblox Inc.