Class: Purest::Volume
- Inherits:
-
APIMethods
- Object
- Rest
- APIMethods
- Purest::Volume
- Defined in:
- lib/purest/volume.rb
Constant Summary collapse
- GET_PARAMS =
%i[action block_size connect historical length names pending pending_only pgrouplist private protect shared snap space].freeze
Instance Method Summary collapse
- #create(options = nil) ⇒ Object
-
#delete(options = nil) ⇒ Object
Delete a volume, DELETE.
-
#get(options = nil) ⇒ Object
Get a list of volumes, GET.
- #update(options = nil) ⇒ Object
Methods inherited from APIMethods
Methods inherited from Rest
access_method?, #authenticated?, #concat_url, #initialize, #logout, method_missing, #use_named_parameter
Constructor Details
This class inherits a constructor from Purest::Rest
Instance Method Details
#create(options = nil) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/purest/volume.rb', line 17 def create( = nil) if [:name] && [:protection_group] appended_path = "#{.delete(:name)}/pgroup/#{.delete(:protection_group)}" end super(, 'volume', appended_path) end |
#delete(options = nil) ⇒ Object
Delete a volume, DELETE
31 32 33 34 35 36 37 |
# File 'lib/purest/volume.rb', line 31 def delete( = nil) if [:name] && [:protection_group] appended_path = "#{.delete(:name)}/pgroup/#{.delete(:protection_group)}" end super(, 'volume', appended_path) end |
#get(options = nil) ⇒ Object
Get a list of volumes, GET
13 14 15 |
# File 'lib/purest/volume.rb', line 13 def get( = nil) super(, 'volume', GET_PARAMS, %i[show_diff show_hgroup show_host]) end |
#update(options = nil) ⇒ Object
25 26 27 |
# File 'lib/purest/volume.rb', line 25 def update( = nil) super(, 'volume') end |