Sha256: cceaa6b408fcb9ece4c0a0753cafec123cc605421da3c8d80f111ea35e22a903

Contents?: true

Size: 715 Bytes

Versions: 74

Compression:

Stored size: 715 Bytes

Contents

module Fog
  module Compute
    class Serverlove
      class Real

        def create_image(options)
          return nil if options.empty? || options.nil?
          request(:method => "post", :path => "/drives/create", :expects => 200, :options => options)
        end

      end
      
      class Mock

        def create_image(options = {})
          response = Excon::Response.new
          response.status = 200

          data = {
            'drive'     => Fog::Mock.random_numbers(1000000).to_s,
            'name'      => options['name'] || 'Test',
            'size'      => options['size'] || 12345
          }

          response.body = data
          response
        end

      end
    end
  end
end

Version data entries

74 entries across 74 versions & 11 rubygems

Version Path
fog-maestrodev-1.20.0.20140305101839 lib/fog/serverlove/requests/compute/create_image.rb
fog-maestrodev-1.20.0.20140305101305 lib/fog/serverlove/requests/compute/create_image.rb
fog-maestrodev-1.19.0.20140212012611 lib/fog/serverlove/requests/compute/create_image.rb
fog-1.20.0 lib/fog/serverlove/requests/compute/create_image.rb
fog-maestrodev-1.19.0.20140110004459 lib/fog/serverlove/requests/compute/create_image.rb
fog-maestrodev-1.19.0.20140110003812 lib/fog/serverlove/requests/compute/create_image.rb
fog-maestrodev-1.19.0.20140109202555 lib/fog/serverlove/requests/compute/create_image.rb
fog-maestrodev-1.19.0.20140107192102 lib/fog/serverlove/requests/compute/create_image.rb
fog-maestrodev-1.19.0.20140107142106 lib/fog/serverlove/requests/compute/create_image.rb
fog-maestrodev-1.19.0.20131219203941 lib/fog/serverlove/requests/compute/create_image.rb
fog-maestrodev-1.18.0.20131219193542 lib/fog/serverlove/requests/compute/create_image.rb
fog-1.19.0 lib/fog/serverlove/requests/compute/create_image.rb
fog-maestrodev-1.18.0.20131219033443 lib/fog/serverlove/requests/compute/create_image.rb
fog-maestrodev-1.18.0.20131219032002 lib/fog/serverlove/requests/compute/create_image.rb
fog-maestrodev-1.18.0.20131219030716 lib/fog/serverlove/requests/compute/create_image.rb
fog-maestrodev-1.18.0.20131219022322 lib/fog/serverlove/requests/compute/create_image.rb
fog-maestrodev-1.18.0.20131218202447 lib/fog/serverlove/requests/compute/create_image.rb
fog-maestrodev-1.18.0.20131209091424 lib/fog/serverlove/requests/compute/create_image.rb
fog-maestrodev-1.18.0.20131209090811 lib/fog/serverlove/requests/compute/create_image.rb
fog-maestrodev-1.18.0.20131206115947 lib/fog/serverlove/requests/compute/create_image.rb