Class: OneviewSDK::VolumeAttachment
- Defined in:
- lib/oneview-sdk/resource/volume_attachment.rb
Overview
Storage volume attachment resource implementation
Constant Summary collapse
- BASE_URI =
'/rest/storage-volume-attachments'.freeze
Instance Attribute Summary
Attributes inherited from Resource
#api_version, #client, #data, #logger
Class Method Summary collapse
-
.get_extra_unmanaged_volumes(client) ⇒ Object
Gets the list of extra unmanaged storage volumes.
-
.remove_extra_unmanaged_volume(client, resource) ⇒ Object
Removes extra presentations from a specific server profile.
Instance Method Summary collapse
-
#create ⇒ Object
Method is not available.
-
#delete ⇒ Object
Method is not available.
-
#get_path(id) ⇒ OneviewSDK::VolumeAttachmentPath
Gets a volume attachment path by id.
-
#get_paths ⇒ Array
Gets all volume attachment paths.
-
#initialize(client, params = {}, api_ver = nil) ⇒ VolumeAttachment
constructor
Create a resource object, associate it with a client, and set its properties.
-
#update ⇒ Object
Method is not available.
Methods inherited from Resource
#==, #[], #[]=, build_query, #create!, #each, #eql?, #exists?, find_by, from_file, get_all, #like?, #refresh, #retrieve!, #schema, schema, #set, #set_all, #to_file
Constructor Details
#initialize(client, params = {}, api_ver = nil) ⇒ VolumeAttachment
Create a resource object, associate it with a client, and set its properties.
21 22 23 24 25 |
# File 'lib/oneview-sdk/resource/volume_attachment.rb', line 21 def initialize(client, params = {}, api_ver = nil) super # Default values: @data['type'] ||= 'StorageVolumeAttachment' end |
Class Method Details
.get_extra_unmanaged_volumes(client) ⇒ Object
Gets the list of extra unmanaged storage volumes
47 48 49 50 |
# File 'lib/oneview-sdk/resource/volume_attachment.rb', line 47 def self.get_extra_unmanaged_volumes(client) response = client.rest_get(BASE_URI + '/repair?alertFixType=ExtraUnmanagedStorageVolumes') client.response_handler(response) end |
.remove_extra_unmanaged_volume(client, resource) ⇒ Object
Removes extra presentations from a specific server profile
55 56 57 58 59 60 61 62 |
# File 'lib/oneview-sdk/resource/volume_attachment.rb', line 55 def self.remove_extra_unmanaged_volume(client, resource) requestBody = { type: 'ExtraUnmanagedStorageVolumes', resourceUri: resource['uri'] } response = client.rest_post(BASE_URI + '/repair', 'body' => requestBody) client.response_handler(response) end |
Instance Method Details
#create ⇒ Object
Method is not available
29 30 31 |
# File 'lib/oneview-sdk/resource/volume_attachment.rb', line 29 def create unavailable_method end |
#delete ⇒ Object
Method is not available
41 42 43 |
# File 'lib/oneview-sdk/resource/volume_attachment.rb', line 41 def delete unavailable_method end |
#get_path(id) ⇒ OneviewSDK::VolumeAttachmentPath
Gets a volume attachment path by id
74 75 76 77 |
# File 'lib/oneview-sdk/resource/volume_attachment.rb', line 74 def get_path(id) response = @client.rest_get("#{@data['uri']}/paths/#{id}") @client.response_handler(response) end |
#get_paths ⇒ Array
Gets all volume attachment paths
66 67 68 69 |
# File 'lib/oneview-sdk/resource/volume_attachment.rb', line 66 def get_paths response = @client.rest_get(@data['uri'] + '/paths') @client.response_handler(response) end |
#update ⇒ Object
Method is not available
35 36 37 |
# File 'lib/oneview-sdk/resource/volume_attachment.rb', line 35 def update unavailable_method end |