Class: OneviewSDK::API300::Synergy::SASLogicalInterconnect
- Includes:
- ResourceHelper::ConfigurationOperation
- Defined in:
- lib/oneview-sdk/resource/api300/synergy/sas_logical_interconnect.rb
Overview
SAS logical interconnect resource implementation
Direct Known Subclasses
Constant Summary collapse
- BASE_URI =
'/rest/sas-logical-interconnects'.freeze
Constants inherited from Resource
Resource::DEFAULT_REQUEST_HEADER, Resource::UNIQUE_IDENTIFIERS
Instance Attribute Summary
Attributes inherited from Resource
#api_version, #client, #data, #logger
Instance Method Summary collapse
-
#compliance ⇒ Object
Returns SAS logical interconnects to a consistent state.
-
#create ⇒ Object
Method is not available.
-
#delete ⇒ Object
Method is not available.
-
#firmware_update(command, firmware_driver, firmware_options) ⇒ Object
Update firmware.
-
#get_firmware ⇒ Hash
Gets the installed firmware for a SAS logical interconnect.
-
#initialize(client, params = {}, api_ver = nil) ⇒ SASLogicalInterconnect
constructor
Create a resource object, associate it with a client, and set its properties.
-
#replace_drive_enclosure(old_serial_number, new_serial_number) ⇒ Object
Initiates the replacement operation after a drive enclosure has been physically replaced.
Methods included from ResourceHelper::ConfigurationOperation
Methods inherited from Resource
#==, #[], #[]=, build_query, #create!, #deep_merge!, #each, #eql?, #exists?, find_by, find_with_pagination, from_file, get_all, get_all_with_query, #like?, #refresh, #retrieve!, schema, #schema, #set, #set_all, #to_file, #update
Constructor Details
#initialize(client, params = {}, api_ver = nil) ⇒ SASLogicalInterconnect
Create a resource object, associate it with a client, and set its properties.
27 28 29 |
# File 'lib/oneview-sdk/resource/api300/synergy/sas_logical_interconnect.rb', line 27 def initialize(client, params = {}, api_ver = nil) super end |
Instance Method Details
#compliance ⇒ Object
Returns SAS logical interconnects to a consistent state. The current SAS logical interconnect state is compared to the associated SAS logical interconnect group.
46 47 48 49 50 51 52 53 54 55 |
# File 'lib/oneview-sdk/resource/api300/synergy/sas_logical_interconnect.rb', line 46 def compliance ensure_client && ensure_uri = { 'If-Match' => @data['eTag'], 'body' => { 'type' => 'sas-logical-interconnect' } } response = @client.rest_put(@data['uri'] + '/compliance', , @api_version) body = @client.response_handler(response) set_all(body) end |
#create ⇒ Object
Method is not available
33 34 35 |
# File 'lib/oneview-sdk/resource/api300/synergy/sas_logical_interconnect.rb', line 33 def create(*) unavailable_method end |
#delete ⇒ Object
Method is not available
39 40 41 |
# File 'lib/oneview-sdk/resource/api300/synergy/sas_logical_interconnect.rb', line 39 def delete(*) unavailable_method end |
#firmware_update(command, firmware_driver, firmware_options) ⇒ Object
Update firmware
70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/oneview-sdk/resource/api300/synergy/sas_logical_interconnect.rb', line 70 def firmware_update(command, firmware_driver, ) ensure_client && ensure_uri ['command'] = command ['sppUri'] = firmware_driver['uri'] ['sppName'] = firmware_driver['name'] update_json = { 'If-Match' => '*', 'body' => } response = @client.rest_put(@data['uri'] + '/firmware', update_json) @client.response_handler(response) end |
#get_firmware ⇒ Hash
Gets the installed firmware for a SAS logical interconnect.
59 60 61 62 63 |
# File 'lib/oneview-sdk/resource/api300/synergy/sas_logical_interconnect.rb', line 59 def get_firmware ensure_client && ensure_uri response = @client.rest_get(@data['uri'] + '/firmware') @client.response_handler(response) end |
#replace_drive_enclosure(old_serial_number, new_serial_number) ⇒ Object
Initiates the replacement operation after a drive enclosure has been physically replaced.
87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/oneview-sdk/resource/api300/synergy/sas_logical_interconnect.rb', line 87 def replace_drive_enclosure(old_serial_number, new_serial_number) ensure_client && ensure_uri = { 'oldSerialNumber' => old_serial_number, 'newSerialNumber' => new_serial_number } update_json = { 'If-Match' => '*', 'body' => } response = @client.rest_post(@data['uri'] + '/replaceDriveEnclosure', update_json) @client.response_handler(response) end |