Class: IControl::System::Services

Inherits:
Base
  • Object
show all
Defined in:
lib/icontrol/system/services.rb,
lib/icontrol/system.rb

Overview

The Services interface enables you to manage the various supported services on the device, such as SSHD, HTTPD, NTPD, SOD....

Defined Under Namespace

Classes: SSHAccess, SSHAccess_v2, ServiceAction, ServiceActionSequence, ServiceStatus, ServiceStatusSequence, ServiceStatusType, ServiceType, ServiceTypeSequence

Instance Method Summary (collapse)

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class IControl::Base

Instance Method Details

- (ServiceStatus) all_service_statuses

Determines whether this service are enabled or disabled on an ITCM appliance.

Returns:

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



27
28
29
# File 'lib/icontrol/system/services.rb', line 27

def all_service_statuses
  super
end

- (ServiceType) list

Gets a list of all service supported on this device.

Returns:

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



38
39
40
# File 'lib/icontrol/system/services.rb', line 38

def list
  super
end

- (Object) reboot_system(opts)

Reboots the system. This method will reboot the system within specified number of seconds. Once this method has been called, no further operations or requests should be sent to the Portal, and make sure all pending operations are completed before the reboot.

Parameters:

  • opts (Hash)

Options Hash (opts):

  • :seconds_to_reboot (long)

    The number of seconds before the reboot takes place.

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



95
96
97
98
# File 'lib/icontrol/system/services.rb', line 95

def reboot_system(opts)
  check_params(opts,[:seconds_to_reboot])
  super
end

- (ServiceStatus) service_status

Gets the statuses of this service

Returns:

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



49
50
51
# File 'lib/icontrol/system/services.rb', line 49

def service_status
  super
end

- (Object) set_all_services(opts)

Sets the action for all service to take. This method is asynchronous, meaning that the method may return before the requested action is completed. NOTE: For this method, the only valid values for service_action are: SERVICE_ACTION_START SERVICE_ACTION_STOP SERVICE_ACTION_REINIT SERVICE_ACTION_RESTART

Parameters:

  • opts (Hash)

Options Hash (opts):

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



111
112
113
114
# File 'lib/icontrol/system/services.rb', line 111

def set_all_services(opts)
  check_params(opts,[:service_action])
  super
end

- (Object) set_service(opts)

Sets the action for this service to take. This method is asynchronous, meaning that the method may return before the requested action is completed.

Parameters:

  • opts (Hash)

Options Hash (opts):

Raises:

  • (IControl::IControl::Common::AccessDenied)

    raised if the client credentials are not valid.

  • (IControl::IControl::Common::InvalidArgument)

    raised if one of the arguments is invalid.

  • (IControl::IControl::Common::OperationFailed)

    raised if an operation error occurs.



125
126
127
128
# File 'lib/icontrol/system/services.rb', line 125

def set_service(opts)
  check_params(opts,[:service_action])
  super
end

- (Object) set_ssh_access(opts)

Note: This method is deprecated; please use get_ssh_access_v2 in new applications. Sets the ssl service state and allowed addresses.

Parameters:

  • opts (Hash)

Options Hash (opts):

Raises:

  • (IControl::IControl::Common::AccessDenied)
  • (IControl::IControl::Common::InvalidArgument)
  • (IControl::IControl::Common::OperationFailed)


139
140
141
142
# File 'lib/icontrol/system/services.rb', line 139

def set_ssh_access(opts)
  check_params(opts,[:access])
  super
end

- (Object) set_ssh_access_v2(opts)

Sets the ssl service state and allowed addresses.

Parameters:

  • opts (Hash)

Options Hash (opts):

Raises:

  • (IControl::IControl::Common::AccessDenied)
  • (IControl::IControl::Common::InvalidArgument)
  • (IControl::IControl::Common::OperationFailed)


152
153
154
155
# File 'lib/icontrol/system/services.rb', line 152

def set_ssh_access_v2(opts)
  check_params(opts,[:access])
  super
end

- (SSHAccess) ssh_access

Note: This method is deprecated; please use get_ssh_access_v2 in new applications. Gets the ssl service state and allowed addresses.

Returns:

Raises:

  • (IControl::IControl::Common::AccessDenied)
  • (IControl::IControl::Common::InvalidArgument)
  • (IControl::IControl::Common::OperationFailed)


61
62
63
# File 'lib/icontrol/system/services.rb', line 61

def ssh_access
  super
end

- (SSHAccess_v2) ssh_access_v2

Gets the ssl service state and allowed addresses.

Returns:

Raises:

  • (IControl::IControl::Common::AccessDenied)
  • (IControl::IControl::Common::InvalidArgument)
  • (IControl::IControl::Common::OperationFailed)


72
73
74
# File 'lib/icontrol/system/services.rb', line 72

def ssh_access_v2
  super
end

- (String) version

Gets the version information for this interface.

Returns:

  • (String)


80
81
82
# File 'lib/icontrol/system/services.rb', line 80

def version
  super
end