Module: ILO_SDK::ManagerNetworkProtocolHelper

Included in:
Client
Defined in:
lib/ilo-sdk/helpers/manager_network_protocol_helper.rb

Overview

Contains helper methods for Manager Network Protocol actions

Instance Method Summary collapse

Instance Method Details

#get_timeoutFixnum

Get the Session Timeout Minutes

Returns:

  • (Fixnum)

    timeout

Raises:

  • (RuntimeError)

    if the request failed



18
19
20
21
# File 'lib/ilo-sdk/helpers/manager_network_protocol_helper.rb', line 18

def get_timeout
  response = rest_get('/redfish/v1/Managers/1/NetworkService/')
  response_handler(response)['SessionTimeoutMinutes']
end

#set_timeout(timeout) ⇒ Object

Set the Session Timeout Minutes

Parameters:

  • timeout (Fixnum)

Returns:

  • true

Raises:

  • (RuntimeError)

    if the request failed



27
28
29
30
31
32
# File 'lib/ilo-sdk/helpers/manager_network_protocol_helper.rb', line 27

def set_timeout(timeout)
  new_action = { 'SessionTimeoutMinutes' => timeout }
  response = rest_patch('/redfish/v1/Managers/1/NetworkService/', body: new_action)
  response_handler(response)
  true
end