Class: OneviewSDK::StoragePool
- Defined in:
- lib/oneview-sdk/resource/storage_pool.rb
Overview
Storage pool resource implementation
Constant Summary collapse
- BASE_URI =
'/rest/storage-pools'.freeze
Instance Attribute Summary
Attributes inherited from Resource
#api_version, #client, #data, #logger
Instance Method Summary collapse
-
#add ⇒ OneviewSDK::StoragePool
Add the resource on OneView using the current data.
-
#create ⇒ Object
Method is not available.
-
#delete ⇒ Object
Method is not available.
-
#initialize(client, params = {}, api_ver = nil) ⇒ StoragePool
constructor
Create a resource object, associate it with a client, and set its properties.
-
#remove ⇒ true
Remove resource from OneView.
-
#set_storage_system(storage_system) ⇒ Object
Sets the storage system.
-
#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) ⇒ StoragePool
Create a resource object, associate it with a client, and set its properties.
32 33 34 35 36 |
# File 'lib/oneview-sdk/resource/storage_pool.rb', line 32 def initialize(client, params = {}, api_ver = nil) super # Default values: @data['type'] ||= 'StoragePoolV2' end |
Instance Method Details
#add ⇒ OneviewSDK::StoragePool
Calls the refresh method to set additional data
Add the resource on OneView using the current data
22 |
# File 'lib/oneview-sdk/resource/storage_pool.rb', line 22 alias add create |
#create ⇒ Object
Method is not available
40 41 42 |
# File 'lib/oneview-sdk/resource/storage_pool.rb', line 40 def create unavailable_method end |
#delete ⇒ Object
Method is not available
46 47 48 |
# File 'lib/oneview-sdk/resource/storage_pool.rb', line 46 def delete unavailable_method end |
#remove ⇒ true
Remove resource from OneView
26 |
# File 'lib/oneview-sdk/resource/storage_pool.rb', line 26 alias remove delete |
#set_storage_system(storage_system) ⇒ Object
Sets the storage system
58 59 60 61 |
# File 'lib/oneview-sdk/resource/storage_pool.rb', line 58 def set_storage_system(storage_system) fail IncompleteResource, 'Please set the storage system\'s uri attribute!' unless storage_system['uri'] set('storageSystemUri', storage_system['uri']) end |
#update ⇒ Object
Method is not available
52 53 54 |
# File 'lib/oneview-sdk/resource/storage_pool.rb', line 52 def update unavailable_method end |