class Purest::Volume

Constants

GET_PARAMS

Public Instance Methods

create(options = nil) click to toggle source
Calls superclass method Purest::APIMethods#create
# File lib/purest/volume.rb, line 17
def create(options = nil)
  if options[:name] && options[:protection_group]
    appended_path = "#{options.delete(:name)}/pgroup/#{options.delete(:protection_group)}"
  end

  super(options, 'volume', appended_path)
end
delete(options = nil) click to toggle source

Delete a volume, DELETE @param options [Hash] options to pass

Calls superclass method Purest::APIMethods#delete
# File lib/purest/volume.rb, line 31
def delete(options = nil)
  if options[:name] && options[:protection_group]
    appended_path = "#{options.delete(:name)}/pgroup/#{options.delete(:protection_group)}"
  end

  super(options, 'volume', appended_path)
end
get(options = nil) click to toggle source

Get a list of volumes, GET @param options [Hash] options to pass

Calls superclass method Purest::APIMethods#get
# File lib/purest/volume.rb, line 13
def get(options = nil)
  super(options, 'volume', GET_PARAMS, %i[show_diff show_hgroup show_host])
end
update(options = nil) click to toggle source
Calls superclass method Purest::APIMethods#update
# File lib/purest/volume.rb, line 25
def update(options = nil)
  super(options, 'volume')
end