Class: OneviewSDK::UnmanagedDevice

Inherits:
Resource
  • Object
show all
Defined in:
lib/oneview-sdk/resource/unmanaged_device.rb

Overview

Storage system resource implementation

Constant Summary collapse

BASE_URI =
'/rest/unmanaged-devices'.freeze

Instance Attribute Summary

Attributes inherited from Resource

#api_version, #client, #data, #logger

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Resource

#==, #[], #[]=, build_query, #create!, #each, #eql?, #exists?, find_by, from_file, get_all, #initialize, #like?, #refresh, #retrieve!, #schema, schema, #set, #set_all, #to_file, #update

Constructor Details

This class inherits a constructor from OneviewSDK::Resource

Class Method Details

.get_devices(client) ⇒ Array

Gets a list of unmanaged devices

Parameters:

Returns:

  • (Array)

    list of unmanaged devices



43
44
45
46
# File 'lib/oneview-sdk/resource/unmanaged_device.rb', line 43

def self.get_devices(client)
  response = client.rest_get(BASE_URI)
  client.response_handler(response)['members']
end

Instance Method Details

#addOneviewSDK::UnmanagedDevice

Note:

Calls the refresh method to set additional data

Add the resource on OneView using the current data

Returns:

Raises:



22
# File 'lib/oneview-sdk/resource/unmanaged_device.rb', line 22

alias add create

#createObject

Method is not available

Raises:



30
31
32
# File 'lib/oneview-sdk/resource/unmanaged_device.rb', line 30

def create
  unavailable_method
end

#deleteObject

Method is not available

Raises:



36
37
38
# File 'lib/oneview-sdk/resource/unmanaged_device.rb', line 36

def delete
  unavailable_method
end

#environmental_configurationObject

Get settings that describe the environmental configuration



49
50
51
52
53
# File 'lib/oneview-sdk/resource/unmanaged_device.rb', line 49

def environmental_configuration
  ensure_client && ensure_uri
  response = @client.rest_get(@data['uri'] + '/environmentalConfiguration')
  @client.response_handler(response)
end

#removetrue

Remove resource from OneView

Returns:

  • (true)

    if resource was removed successfully



26
# File 'lib/oneview-sdk/resource/unmanaged_device.rb', line 26

alias remove delete