Class: XClarityClient::NodeManagement
Overview
Instance Method Summary
collapse
#send_led_state_request, #send_power_request, #set_loc_led_state, #set_power_state
#fetch_all, #get_headers_with_opts, #get_object, #get_object_with_id, #get_object_with_opts, #initialize
#build_response_with_resource_list
#add_listname_on_body
Instance Method Details
35
36
37
38
39
|
# File 'lib/xclarity_client/services/node_management.rb', line 35
def disable_media_mount_support(uuid)
uri = Node::BASE_URI + "/#{uuid}/" + 'mediaMount'
req_body = JSON.generate(:action => 'disableMountMedia')
@connection.do_put(uri, req_body)
end
|
29
30
31
32
33
|
# File 'lib/xclarity_client/services/node_management.rb', line 29
def enable_media_mount_support(uuid)
uri = Node::BASE_URI + "/#{uuid}/" + 'mediaMount'
req_body = JSON.generate(:action => 'enableMountMedia')
@connection.do_put(uri, req_body)
end
|
47
48
49
50
51
52
|
# File 'lib/xclarity_client/services/node_management.rb', line 47
def mount_media(uuid, opts)
uri = Node::BASE_URI + "/#{uuid}/" + 'mediaMount'
opts[:action] = 'mount'
req_body = JSON.generate(opts)
@connection.do_put(uri, req_body)
end
|
41
42
43
44
45
|
# File 'lib/xclarity_client/services/node_management.rb', line 41
def remove_all_mounted_medias(uuid)
uri = Node::BASE_URI + "/#{uuid}/" + 'mediaMount'
req_body = JSON.generate(:action => 'reset')
@connection.do_put(uri, req_body)
end
|
24
25
26
27
|
# File 'lib/xclarity_client/services/node_management.rb', line 24
def retrieve_mounted_media_details(uuid)
uri = Node::BASE_URI + "/#{uuid}/" + 'mediaMount'
@connection.do_get(uri)
end
|
#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
|
54
55
56
57
58
59
60
|
# File 'lib/xclarity_client/services/node_management.rb', line 54
def unmount_media_thinkserver(uuid, media_type)
uri = Node::BASE_URI + "/#{uuid}/" + 'mediaMount'
opts = { :action => 'unmount',
:mediaType => media_type }
req_body = JSON.generate(opts)
@connection.do_put(uri, req_body)
end
|
62
63
64
65
66
67
68
|
# File 'lib/xclarity_client/services/node_management.rb', line 62
def unmount_media_thinksystem(uuid, media_uid)
uri = Node::BASE_URI + "/#{uuid}/" + 'mediaMount'
opts = { :action => 'unmount',
:UID => media_uid }
req_body = JSON.generate(opts)
@connection.do_put(uri, req_body)
end
|