Sha256: bcc2987097fdcb7c243e7d0ad3bf8ac24d374cdaf0e8baf6a2d3cd1fc8bc71c3

Contents?: true

Size: 757 Bytes

Versions: 14

Compression:

Stored size: 757 Bytes

Contents

module Fog
  module Rackspace
    class BlockStorage
      class Real
        def create_snapshot(volume_id, options = {})
          data = {
            'snapshot' => {
              'volume_id' => volume_id
            }
          }

          data['snapshot']['display_name'] = options[:display_name] unless options[:display_name].nil?
          data['snapshot']['display_description'] = options[:display_description] unless options[:display_description].nil?
          data['snapshot']['force'] = options[:force] unless options[:force].nil?

          request(
            :body => Fog::JSON.encode(data),
            :expects => [200],
            :method => 'POST',
            :path => "snapshots"
          )
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 7 rubygems

Version Path
fog-nirvanix-1.8.2 lib/fog/rackspace/requests/block_storage/create_snapshot.rb
fog-nirvanix-1.8.1 lib/fog/rackspace/requests/block_storage/create_snapshot.rb
fog-parser-fix-1.6.1 lib/fog/rackspace/requests/block_storage/create_snapshot.rb
fog-test-again-1.6.0 lib/fog/rackspace/requests/block_storage/create_snapshot.rb
fog-parser-fix-1.6.0 lib/fog/rackspace/requests/block_storage/create_snapshot.rb
fog-maestrodev-1.8.0.20130114204828 lib/fog/rackspace/requests/block_storage/create_snapshot.rb
fog-maestrodev-1.8.0.20130111070250 lib/fog/rackspace/requests/block_storage/create_snapshot.rb
fog-maestrodev-1.8.0.20130109172219 lib/fog/rackspace/requests/block_storage/create_snapshot.rb
ey-vendored-backup-3.0.27 vendor/gems/fog/lib/fog/rackspace/requests/block_storage/create_snapshot.rb
fog-sgonyea-1.8.1 lib/fog/rackspace/requests/block_storage/create_snapshot.rb
fog-1.8.0 lib/fog/rackspace/requests/block_storage/create_snapshot.rb
fog-maestrodev-1.7.0.20121114190951 lib/fog/rackspace/requests/block_storage/create_snapshot.rb
fog-1.7.0 lib/fog/rackspace/requests/block_storage/create_snapshot.rb
fog-1.6.0 lib/fog/rackspace/requests/block_storage/create_snapshot.rb