class OneviewSDK::API1800::C7000::ServerHardware

Server Hardware resource implementation on API1800 C7000

Public Class Methods

new(client, params = {}, api_ver = nil) click to toggle source

Create a resource object, associate it with a client, and set its properties. @param [OneviewSDK::Client] client The client object for the OneView appliance @param [Hash] params The options for this resource (key-value pairs) @param [Integer] api_ver The api version to use when interracting with this resource.

# File lib/oneview-sdk/resource/api1800/c7000/server_hardware.rb, line 23
def initialize(client, params = {}, api_ver = nil)
  @data ||= {}
  # Default values
  @data['type'] ||= 'server-hardware-12'
  super
end

Public Instance Methods

get_local_storage() click to toggle source

Gets the local storage resource for the server, including storage controllers, storage enclosures, physical drives, and logical drives. @return [Hash] Contains the actual subresource data collected from the Management Processor

# File lib/oneview-sdk/resource/api1800/c7000/server_hardware.rb, line 33
def get_local_storage
  ensure_client && ensure_uri
  response = @client.rest_get(@data['uri'] + '/localStorage')
  @client.response_handler(response)
end
get_local_storagev2() click to toggle source

Gets the updated version 2 local storage resource for the server, including storage controllers, drives, and volumes. Starting with Gen 10 Plus, certain storage adapters will provide /localStorageV2 instead of (or in addition to) /localStorage @return [Hash] Contains the storage data based on the following schema.

# File lib/oneview-sdk/resource/api1800/c7000/server_hardware.rb, line 43
def get_local_storagev2
  ensure_client && ensure_uri
  response = @client.rest_get(@data['uri'] + '/localStorageV2')
  @client.response_handler(response)
end