Method: OneviewSDK::API200::ServerProfile.get_available_storage_system

Defined in:
lib/oneview-sdk/resource/api200/server_profile.rb

.get_available_storage_system(client, query = nil) ⇒ Object

Gets the available storage systems based on the query parameters

Parameters:

  • client (OneviewSDK::Client)

    The client object for the OneView appliance

  • query (Hash<String,Object>) (defaults to: nil)

    Query parameters

Options Hash (query):

  • 'enclosure_group' (OneviewSDK::EnclosureGroup)

    Enclosure Group associated with the resource

  • 'server_hardware_type' (OneviewSDK::ServerHardwareType)

    The server hardware type associated with the resource

  • 'storage_system' (OneviewSDK::StorageSystem)

    The Storage System the resources are associated with



342
343
344
345
346
347
348
349
350
351
352
# File 'lib/oneview-sdk/resource/api200/server_profile.rb', line 342

def self.get_available_storage_system(client, query = nil)
  # For storage_system the query requires the ID instead the URI
  if query && query['storage_system']
    query['storage_system'].retrieve! unless query['storage_system']['uri']
    query['storage_system_id'] = query['storage_system']['uri'].split('/').last
    query.delete('storage_system')
  end
  query_uri = build_query(query) if query
  response = client.rest_get("#{BASE_URI}/available-storage-system#{query_uri}")
  client.response_handler(response)
end