Sha256: 755ef80b940fe390d31f93b740a2e162e693787175c997fe64437c099c1ccc0e

Contents?: true

Size: 767 Bytes

Versions: 2

Compression:

Stored size: 767 Bytes

Contents

module DcmgrResource
  class VolumeSnapshot < Base

    def self.list(params = {})
      data = self.find(:all, :params => params)
      results = []
      data.each { |row|
        results << row.attributes
      }
    end

    def self.show(snapshot_id)
      self.get(snapshot_id)
    end
  
    def self.create(params)
      snapshot = self.new
      snapshot.volume_id = params[:volume_id]
      snapshot.save
      snapshot
    end
  
    def self.destroy(snapshot_id)
      self.delete(snapshot_id).body
    end
    
    def self.status(account_id)
      @collection ||= self.collection_name
      self.collection_name = File.join(@collection,account_id)
      result = self.get(:status)
      self.collection_name = @collection
      result
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
wakame-vdc-webui-10.12.0 app/models/dcmgr_resource/volume_snapshot.rb
wakame-vdc-webui-10.11.0 app/models/dcmgr_resource/volume_snapshot.rb