Infoblox::Grid::ServiceRestart::Group - a Grid Service Restart Group object.


NAME

Infoblox::Grid::ServiceRestart::Group - a Grid Service Restart Group object.


DESCRIPTION

The Grid Service Restart Group object provides information about restart of particular services and members, their order and periodicity.


CONSTRUCTOR

 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
 );


SESSION METHODS

This section describes all the methods in a Session module that you can apply to a Grid Service Restart Group 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 $svcrst_group = Infoblox::Grid::ServiceRestart::Group->new(
    name    => 'test_group',
    service => 'DHCP',
 );
 #Submit for addition
 my $response = $session->add($svcrst_group);

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 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.
Example
 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' }
 );

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 method to modify the comment.
 $svcrst_group->comment('this is a modified comment');
 #Submit modification
 my $response = $session->modify($svcrst_group);

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::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);

Infoblox::Session->search( )

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

Key Reference
 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.
Example
 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' }
 );


METHODS

This section describes all the methods that you can use to set or retrieve the attribute values of the object.

comment( )

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.

Parameter

The valid value is a desired comment in 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
 my $comment = $svcrst_group->comment();
 #Modify comment
 $svcrst_group->comment(50);

extattrs( )

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.

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

extensible_attributes( )

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.

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

is_default( )

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.

Parameter

None

Returns

The method returns attribute value.

Example
 #Get is_default
 my $is_default = $svcrst_group->is_default();

last_updated_time( )

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.

Parameter

None

Returns

The method returns the number of seconds that have elapsed since January 1st, 1970 UTC.

Example
 #Get last_updated_time
 my $last_updated_time = $svcrst_group->last_updated_time()

members( )

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.

Parameter

The valid value is an array reference of desired Grid Members names.

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 members
 my $members = $svcrst_group->members();
 #Modify members
 $svcrst_group->members(['foo.com', 'bar.com']);

mode( )

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.

Parameter

The valid values are 'SEQUENTIAL' and 'SIMULTANEOUS'.

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 mode
 my $mode = $svcrst_group->mode();
 #Modify mode
 $svcrst_group->mode('SEQUENTIAL');

name( )

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.

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

position( )

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.

Parameter

None

Returns

The method returns the attribute value.

Example
 #Get position
 my $position = $svcrst_group->position();

recurring_schedule( )

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.

Parameter

The valid value is an Infoblox::Grid::ServiceRestart::Group::Schedule 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 recurring_schedule
 my $recurring_schedule = $svcrst_group->recurring_schedule();
 #Modify recurring_schedule
 $svcrst_group->recurring_schedule($svcrst_sched);

requests( )

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.

Parameter

None

Returns

The valid return value is an array of Infoblox::Grid::ServiceRestart::Request objects.

Example
 #Get requests
 my $requests = $svcrst_group->requests();

service( )

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.

Parameter

The valid value is 'DHCP' or 'DNS'.

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 service
 my $service = $svcrst_group->service();
 #Modify service
 $svcrst_group->service('DHCP');

status( )

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.

Parameter

None

Returns

The valid return value is an Infoblox::Grid::ServiceRestart::Status object.

Example
 #Get status
 my $status = $svcrst_group->status();


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::Grid::Extattr, Infoblox::Grid::ExtensibleAttributeDef/Extensible Attribute Values, Infoblox::Grid::ServiceRestart::Group::Schedule, Infoblox::Grid::ServiceRestart::Request, Infoblox::Grid::ServiceRestart::Status.


COPYRIGHT

Copyright (c) 2017 Infoblox Inc.