class OneviewSDK::API200::VolumeAttachment

Storage volume attachment resource implementation

Constants

BASE_URI

Public Class Methods

get_extra_unmanaged_volumes(client) click to toggle source

Gets the list of extra unmanaged storage volumes @param [OneviewSDK::Client] client The client object for the OneView appliance @return [Array] Array of extra unmanaged storage volumes

# File lib/oneview-sdk/resource/api200/volume_attachment.rb, line 51
def self.get_extra_unmanaged_volumes(client)
  response = client.rest_get(BASE_URI + '/repair?alertFixType=ExtraUnmanagedStorageVolumes')
  body = client.response_handler(response)
  body['members'].map { |data| new(client, data) }
end
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.

Calls superclass method OneviewSDK::Resource::new
# File lib/oneview-sdk/resource/api200/volume_attachment.rb, line 24
def initialize(client, params = {}, api_ver = nil)
  super
  # Default values:
  @data['type'] ||= 'StorageVolumeAttachment'
end
remove_extra_unmanaged_volume(client, resource) click to toggle source

Removes extra presentations from a specific server profile @param [OneviewSDK::Client] client The client object for the OneView appliance @param [OneviewSDK::Resource] resource Oneview resource

# File lib/oneview-sdk/resource/api200/volume_attachment.rb, line 60
def self.remove_extra_unmanaged_volume(client, resource)
  requestBody = {
    type: 'ExtraUnmanagedStorageVolumes',
    resourceUri: resource['uri']
  }
  response = client.rest_post(BASE_URI + '/repair', { 'Accept-Language' => 'en_US', 'body' => requestBody }, client.api_version)
  client.response_handler(response)
end

Public Instance Methods

create(*) click to toggle source

Method is not available @raise [OneviewSDK::MethodUnavailable] method is not available

# File lib/oneview-sdk/resource/api200/volume_attachment.rb, line 32
def create(*)
  unavailable_method
end
delete(*) click to toggle source

Method is not available @raise [OneviewSDK::MethodUnavailable] method is not available

# File lib/oneview-sdk/resource/api200/volume_attachment.rb, line 44
def delete(*)
  unavailable_method
end
get_path(id) click to toggle source

Gets a volume attachment path by id @param [String] id Volume attachament path id @return [OneviewSDK::VolumeAttachmentPath]

# File lib/oneview-sdk/resource/api200/volume_attachment.rb, line 79
def get_path(id)
  response = @client.rest_get("#{@data['uri']}/paths/#{id}")
  @client.response_handler(response)
end
get_paths() click to toggle source

Gets all volume attachment paths @return [Array] List of the storage volume attachments paths

# File lib/oneview-sdk/resource/api200/volume_attachment.rb, line 71
def get_paths
  response = @client.rest_get(@data['uri'] + '/paths')
  @client.response_handler(response)
end
update(*) click to toggle source

Method is not available @raise [OneviewSDK::MethodUnavailable] method is not available

# File lib/oneview-sdk/resource/api200/volume_attachment.rb, line 38
def update(*)
  unavailable_method
end