fog/fog-storm_on_demand

View on GitHub
lib/fog/storage/storm_on_demand/models/volumes.rb

Summary

Maintainability
A
50 mins
Test Coverage
module Fog
  module Storage
    class StormOnDemand
      class Volumes < Fog::Collection
        model Fog::Storage::StormOnDemand::Volume

        def create(options)
          vol = service.create_volume(options).body
          new(vol)
        end

        def get(uniq_id)
          vol = service.get_volume(:uniq_id => uniq_id).body
          new(vol)
        end

        def all(options = {})
          vols = service.list_volumes(options).body["items"]
          load(vols)
        end
      end
    end
  end
end