Class: XClarityClient::NodeManagement

Inherits:
Services::XClarityService show all
Includes:
Services::PowerActionSenderMixin
Defined in:
lib/xclarity_client/services/node_management.rb

Overview

Node Management class

Instance Method Summary collapse

Methods included from Services::PowerActionSenderMixin

#send_led_state_request, #send_power_request, #set_loc_led_state, #set_power_state

Methods inherited from Services::XClarityService

#fetch_all, #get_headers_with_opts, #get_object, #get_object_with_id, #get_object_with_opts, #initialize

Methods included from Services::ResponseBuilderMixin

#build_response_with_resource_list

Methods included from Services::ListNameInterpreterMixin

#add_listname_on_body

Constructor Details

This class inherits a constructor from XClarityClient::Services::XClarityService

Instance Method Details

#set_bmc_power_state(uuid, requested_state = nil) ⇒ Object



13
14
15
16
17
18
19
20
21
22
# File 'lib/xclarity_client/services/node_management.rb', line 13

def set_bmc_power_state(uuid, requested_state = nil)
  if [uuid, requested_state].any? { |item| item.nil? }
    error = 'Invalid target or power state requested'
    source = 'XClarity::NodeManagement set_bmc_power_state'
    $lxca_log.info source, error
    raise ArgumentError, error
  end

  send_power_request(managed_resource::BASE_URI + '/' + uuid + '/bmc', requested_state)
end