Infoblox::Grid::ServiceRestart::Group - a Grid Service Restart Group object.
The Grid Service Restart Group object provides information about restart of particular services and members, their order and periodicity.
my $svcrst_group = Infoblox::Grid::ServiceRestart::Group->new( name => $string, # Required service => 'DHCP' | 'DNS', # Required comment => $string, # Optional / Default is undefined mode => 'SIMULTANEOUS' | 'SEQUENTIAL', # Optional / Default is # 'SEQUENTIAL' for default restart groups / # 'SIMULTANEOUS' for non-default restart groups members => $string_array, # Optional / Default is undefined recurring_schedule => $svcrst_schedule, # Optional / Default is undefined extattrs => { $string => $extattr, ... }, # Optional / Default is undefined extensible_attributes => { $string => $string | $num, $string => [ $string | $num, ... ], ... } # Optional / Default is undefined );
This section describes all the methods in a Session module that you can apply to a Grid Service Restart Group 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 $svcrst_group = Infoblox::Grid::ServiceRestart::Group->new( name => 'test_group', service => 'DHCP', );
#Submit for addition my $response = $session->add($svcrst_group);
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:
comment - Optional. A Grid Service Restart Group comment. extattrs - Optional. A hash reference containing extensible attributes. extensible_attributes - Optional. A hash reference that contains extensible attributes. is_default - Optional. Flag which indicates whether the Grid Service Restart Group is a default restart group or not. name - Optional. A Grid Service Restart Group name. position - Optional. A Grid Service Restart Group position in Restart Service Order object. service - Optional. A Grid Service Restart Group service name.
my @retrieved_objs = $session->get( object => 'Infoblox::Grid::ServiceRestart::Group', name => 'test_group', );
my @retrieved_objs = $session->get( object => 'Infoblox::Grid::ServiceRestart::Group', 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. $svcrst_group->comment('this is a modified comment'); #Submit modification my $response = $session->modify($svcrst_group);
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::Grid::ServiceRestart::Group', name => 'svcrst_group1', ); #Find the desired object from the retrieved list. my $desired_svcrst_group = $retrieved_objs[0]; #Submit for removal my $response = $session->remove($desired_svcrst_group);
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:
comment - Optional. A Grid Service Restart Group comment. extattrs - Optional. A hash reference containing extensible attributes. extensible_attributes - Optional. A hash reference that contains extensible attributes. is_default - Optional. Flag which indicates whether the Grid Service Restart Group is a default restart group or not. name - Optional. A Grid Service Restart Group name. position - Optional. A Grid Service Restart Group position in Restart Service Order object. service - Optional. A Grid Service Restart Group service name.
my @retrieved_objs = $session->search( object => 'Infoblox::Grid::ServiceRestart::Group', name => 'svcrst.*', );
my @retrieved_objs = $session->search( object => 'Infoblox::Grid::ServiceRestart::Group', 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 Grid Service Restart Group object comment.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
The valid value is a desired comment in 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 comment my $comment = $svcrst_group->comment(); #Modify comment $svcrst_group->comment(50);
Use this method to set or retrieve the extensible attributes associated with a Grid Service Restart Group 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 = $svcrst_group->extattrs();
#Modify extattrs $svcrst_group->extattrs({ 'Site' => $extattr1, 'Administrator' => $extattr2 });
Use this method to set or retrieve the extensible attributes associated with a Grid Service Restart Group 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 = $svcrst_group->extensible_attributes();
#Modify extensible attributes $svcrst_group->extensible_attributes({'Site' => 'Santa Clara', 'Administrator' => ['Peter', 'Tom']});
Use this method to retrieve the flag which indicates whether the Grid Service Restart Group is a default group or not. This is a read-only attribute.
Omit the parameter to retrieve the attribute value.
None
The method returns attribute value.
#Get is_default my $is_default = $svcrst_group->is_default();
Use this method to retrieve time of the last restart of the Grid Service Restart Group. This is the read-only attribute.
Omit the parameter tor retrieve the attribute value.
None
The method returns the number of seconds that have elapsed since January 1st, 1970 UTC.
#Get last_updated_time my $last_updated_time = $svcrst_group->last_updated_time()
Use this method to set or retrieve Grid Members associated with the Grid Service Restart Group.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
The valid value is an array reference of desired Grid Members names.
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 members my $members = $svcrst_group->members(); #Modify members $svcrst_group->members(['foo.com', 'bar.com']);
Use this method to set or retrieve the restart mode of Grid Members in the Grid Service Restart Group.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
Note that if the Service Restart Group is a default one, the default value is 'SEQUENTIAL', 'SIMULTANEOUS' otherwise.
The valid values are 'SEQUENTIAL' and 'SIMULTANEOUS'.
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 mode my $mode = $svcrst_group->mode(); #Modify mode $svcrst_group->mode('SEQUENTIAL');
Use this method to set or retrieve the Grid Service Restart Group name.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
The valid value is a desired 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 my $name = $svcrst_group->name(); #Modify name $svcrst_group->name('new_name');
Use this method to retrieve the restart position of the Grid Service Restart Group. This is a read-only attribute.
Omit the parameter to retrieve the attribute value.
None
The method returns the attribute value.
#Get position my $position = $svcrst_group->position();
Use this method to set or retrieve the recurring schedule of the Grid Service Restart Group.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
The valid value is an Infoblox::Grid::ServiceRestart::Group::Schedule 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 recurring_schedule my $recurring_schedule = $svcrst_group->recurring_schedule(); #Modify recurring_schedule $svcrst_group->recurring_schedule($svcrst_sched);
Use this method to retrieve the array of Grid Service Restart Requests. This is a read-only attribute.
Omit the parameter to retrieve the attribute value.
None
The valid return value is an array of Infoblox::Grid::ServiceRestart::Request objects.
#Get requests my $requests = $svcrst_group->requests();
Use this method to set or retrieve the service name for the Grid Service Restart Group.
Include the specified parameter to set the attribute value. Omit the parameter to retrieve the attribute value.
The valid value is 'DHCP' or 'DNS'.
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 service my $service = $svcrst_group->service(); #Modify service $svcrst_group->service('DHCP');
Use this method to retrieve the Grid Service Restart Group restart status. This is a read-only attribute.
Omit the parameter to retrieve the attribute value.
None
The valid return value is an Infoblox::Grid::ServiceRestart::Status object.
#Get status my $status = $svcrst_group->status();
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::Grid::ServiceRestart::Group::Schedule, Infoblox::Grid::ServiceRestart::Request, Infoblox::Grid::ServiceRestart::Status.
Copyright (c) 2017 Infoblox Inc.