Class: OneviewSDK::API300::Synergy::SASInterconnect
- Defined in:
- lib/oneview-sdk/resource/api300/synergy/sas_interconnect.rb
Overview
SAS Interconnect resource implementation
Direct Known Subclasses
Constant Summary collapse
- BASE_URI =
'/rest/sas-interconnects'.freeze
- TYPE_URI =
'/rest/sas-interconnect-types'.freeze
Constants inherited from Resource
Resource::DEFAULT_REQUEST_HEADER, Resource::UNIQUE_IDENTIFIERS
Instance Attribute Summary
Attributes inherited from Resource
#api_version, #client, #data, #logger
Class Method Summary collapse
-
.get_type(client, name) ⇒ Array
Retrieves a SAS interconnect type by name.
-
.get_types(client) ⇒ Object
Retrieves SAS interconnect types.
Instance Method Summary collapse
-
#create ⇒ Object
Method is not available.
-
#delete ⇒ Object
Method is not available.
-
#initialize(client, params = {}, api_ver = nil) ⇒ SASInterconnect
constructor
Create a resource object, associate it with a client, and set its properties.
-
#patch(operation, path, value) ⇒ Object
Updates specific attributes for a given SAS interconnect.
-
#set_refresh_state(state) ⇒ Object
Set refresh state for SAS Interconnect.
-
#update ⇒ Object
Method is not available.
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
Constructor Details
#initialize(client, params = {}, api_ver = nil) ⇒ SASInterconnect
Create a resource object, associate it with a client, and set its properties.
26 27 28 |
# File 'lib/oneview-sdk/resource/api300/synergy/sas_interconnect.rb', line 26 def initialize(client, params = {}, api_ver = nil) super end |
Class Method Details
.get_type(client, name) ⇒ Array
Retrieves a SAS interconnect type by name
60 61 62 63 |
# File 'lib/oneview-sdk/resource/api300/synergy/sas_interconnect.rb', line 60 def self.get_type(client, name) results = get_types(client) results.find { |interconnect_type| interconnect_type['name'] == name } end |
.get_types(client) ⇒ Object
Retrieves SAS interconnect types
50 51 52 53 54 |
# File 'lib/oneview-sdk/resource/api300/synergy/sas_interconnect.rb', line 50 def self.get_types(client) response = client.rest_get(TYPE_URI) response = client.response_handler(response) response['members'] end |
Instance Method Details
#create ⇒ Object
Method is not available
32 33 34 |
# File 'lib/oneview-sdk/resource/api300/synergy/sas_interconnect.rb', line 32 def create(*) unavailable_method end |
#delete ⇒ Object
Method is not available
44 45 46 |
# File 'lib/oneview-sdk/resource/api300/synergy/sas_interconnect.rb', line 44 def delete(*) unavailable_method end |
#patch(operation, path, value) ⇒ Object
Updates specific attributes for a given SAS interconnect
78 79 80 81 82 83 |
# File 'lib/oneview-sdk/resource/api300/synergy/sas_interconnect.rb', line 78 def patch(operation, path, value) ensure_client && ensure_uri response = @client.rest_patch(@data['uri'], 'body' => [{ op: operation, path: path, value: value }]) patched_data = @client.response_handler(response) set_all(patched_data) end |
#set_refresh_state(state) ⇒ Object
Set refresh state for SAS Interconnect
67 68 69 70 71 72 |
# File 'lib/oneview-sdk/resource/api300/synergy/sas_interconnect.rb', line 67 def set_refresh_state(state) ensure_client && ensure_uri response = @client.rest_put(@data['uri'] + '/refreshState', 'body' => { refreshState: state }) refreshed_data = @client.response_handler(response) set_all(refreshed_data) end |
#update ⇒ Object
Method is not available
38 39 40 |
# File 'lib/oneview-sdk/resource/api300/synergy/sas_interconnect.rb', line 38 def update(*) unavailable_method end |