Class: OneviewSDK::API200::VolumeAttachment
- Defined in:
- lib/oneview-sdk/resource/api200/volume_attachment.rb
Overview
Storage volume attachment resource implementation
Direct Known Subclasses
OneviewSDK::API300::C7000::VolumeAttachment, OneviewSDK::API300::Synergy::VolumeAttachment
Constant Summary collapse
- BASE_URI =
'/rest/storage-volume-attachments'.freeze
Constants inherited from Resource
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.
24 25 26 27 28 |
# 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 |
Class Method Details
.get_extra_unmanaged_volumes(client) ⇒ Object
Gets the list of extra unmanaged storage volumes
50 51 52 53 |
# File 'lib/oneview-sdk/resource/api200/volume_attachment.rb', line 50 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
58 59 60 61 62 63 64 65 |
# File 'lib/oneview-sdk/resource/api200/volume_attachment.rb', line 58 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 |
Instance Method Details
#create ⇒ Object
Method is not available
32 33 34 |
# File 'lib/oneview-sdk/resource/api200/volume_attachment.rb', line 32 def create(*) unavailable_method end |
#delete ⇒ Object
Method is not available
44 45 46 |
# File 'lib/oneview-sdk/resource/api200/volume_attachment.rb', line 44 def delete(*) unavailable_method end |
#get_path(id) ⇒ OneviewSDK::VolumeAttachmentPath
Gets a volume attachment path by id
77 78 79 80 |
# File 'lib/oneview-sdk/resource/api200/volume_attachment.rb', line 77 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
69 70 71 72 |
# File 'lib/oneview-sdk/resource/api200/volume_attachment.rb', line 69 def get_paths response = @client.rest_get(@data['uri'] + '/paths') @client.response_handler(response) end |
#update ⇒ Object
Method is not available
38 39 40 |
# File 'lib/oneview-sdk/resource/api200/volume_attachment.rb', line 38 def update(*) unavailable_method end |