Infoblox::DTC::Topology - A DTC Topology object.
A DTC Topology is a named list of ordered DTC topology rules. These rules cannot be shared. Topology rules map client IPs to pools or resources.
my $topology = Infoblox::DTC::Topology->new( name => $string, #Required comment => $string, #Optional / Default is undefined rules => [$rule1, $rule2, ...], #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.
This section describes all the methods in a Session module that you can apply to a Topology object.
Use this method to add an object to the Infoblox appliance. See Infoblox::Session->add() for parameters and return values.
#construct an object my $topology = Infoblox::DTC::Topology->new( name => 'topology', rules => [$rule1, $rule2, ...], );
#submit for addition my $response = $session->add($topology);
Use this method to retrieve all the matching objects from the Infoblox appliance. See Infoblox::Session->get() for parameters and return values.
Apply the following attribute to get a specific object:
name - Optional. A DTC Topology name in a string format. comment - Optional. A DTC Topology comment. extattrs - Optional. A hash reference containing extensible attributes. extensible_attributes - Optional. A hash reference that contains extensible attributes.
my @retrieved_objs = $session->get( object => 'Infoblox::DTC::Topology', name => 'topology', );
my @retrieved_objs = $session->get( object => 'Infoblox::DTC::Topology', extensible_attributes => { 'Site' => 'Santa Clara' } );
Use this method to modify an object in the Infoblox appliance. See Infoblox::Session->modify() for parameters and return values.
#Use method to modify the comment $topology->comment('this is a modified comment'); #Submit modification my $response = $session->modify($topology);
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.
#Get the objects with the same name my @retrieved_objs = $session->get( object => 'Infoblox::DTC::Topology', name => 'topology', ); #Find the desired object from the retrieved list. my $desired_topology = $retrieved_objs[0]; #Submit for removal my $response = $session->remove($desired_topology);
Use this method to search for objects in the Infoblox appliance. See Infoblox::Session->search() for parameters and return values.
Apply the following attribute to get a specific object:
name - Optional. A DTC Topology name in a string format. comment - Optional. A DTC Topology comment. extattrs - Optional. A hash reference containing extensible attributes. extensible_attributes - Optional. A hash reference that contains extensible attributes.
my @retrieved_objs = $session->search( object => 'Infoblox::DTC::Topology', name => 'top.*', );
my @retrieved_objs = $session->search( object => 'Infoblox::DTC::Topology', extensible_attributes => { 'Site' => 'Santa Clara' } );
This section describes all the methods that you can use to set or retrieve the attribute values of the object.
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.
Desired comment in a string format (UTF-8) with a maximum of 256 bytes.
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.
#get comment value my $comment = $topology->comment();
#modify comment value $topology->comment('desired comment');
Use this method to set or retrieve the extensible attributes associated with a DTC Topology object.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Valid value is a hash reference containing the names of extensible attributes and their associated values (Infoblox::Grid::Extattr objects).
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.
#get extattrs value my $ref_extattrs = $topology->extattrs();
#Modify extattrs $topology->extattrs({ 'Site' => $extattr1, 'Administrator' => $extattr2 });
Use this method to set or retrieve the extensible attributes associated with a DTC Topology object.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
For valid values for extensible attributes, see Infoblox::Grid::ExtensibleAttributeDef/Extensible Attribute Values.
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.
#Get extensible attributes my $ref_extensible_attributes = $topology->extensible_attributes();
#Modify extensible attributes $topology->extensible_attributes({'Site' => 'Santa Clara', 'Administrator' => ['Peter', 'Tom']});
Use this method to set or retrieve topology name.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
The valid value is a topology list name in a string format.
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.
#get name value my $name = $topology->name();
#modify name value $topology->name('topology1');
Use this method to set or retrieve a list of topology rules.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
The valid value is an Infoblox::DTC::Topology::Rule object.
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.
#get rules value my $rules = $topology->rules();
#modify rules value $topology->rules([$rule1, $rule2]);
Infoblox Inc. http://www.infoblox.com/
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::Topology::Rule.
Copyright (c) 2017 Infoblox Inc.