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

#all_service_statusesServiceStatus

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

#listServiceType

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

#reboot_system(opts) ⇒ Object

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)
  opts = check_params(opts,[:seconds_to_reboot])
  super(opts)
end

#service_statusServiceStatus

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

#set_all_services(opts) ⇒ Object

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)
  opts = check_params(opts,[:service_action])
  super(opts)
end

#set_service(opts) ⇒ Object

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)
  opts = check_params(opts,[:service_action])
  super(opts)
end

#set_ssh_access(opts) ⇒ Object

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)
  opts = check_params(opts,[:access])
  super(opts)
end

#set_ssh_access_v2(opts) ⇒ Object

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)
  opts = check_params(opts,[:access])
  super(opts)
end

#ssh_accessSSHAccess

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

#ssh_access_v2SSHAccess_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

#versionString

Gets the version information for this interface.

Returns:

  • (String)


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

def version
  super
end