Sha256: 8f18f1247bf3c82c3ca0114272a0350737f7ddd7d2af99edf9f2ca3dd8fb43eb

Contents?: true

Size: 581 Bytes

Versions: 12

Compression:

Stored size: 581 Bytes

Contents

module Fog
  module Volume
    class OpenStack
      module Real
        def extend_volume(volume_id, size)
          body = { 'os-extend' => { 'new_size' => size } }
          request(
            :expects  => 202,
            :method   => 'POST',
            :path     => "volumes/#{volume_id}/action",
            :body     => Fog::JSON.encode(body)
          )
        end
      end

      module Mock
        def extend_volume(volume_id, size)
          response = Excon::Response.new
          response.status = 202
          response
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
fog-openstack-0.1.10 lib/fog/openstack/requests/volume/extend_volume.rb
fog-openstack-0.1.9 lib/fog/openstack/requests/volume/extend_volume.rb
fog-openstack-0.1.8 lib/fog/openstack/requests/volume/extend_volume.rb
fog-openstack-0.1.7 lib/fog/openstack/requests/volume/extend_volume.rb
fog-openstack-0.1.6 lib/fog/openstack/requests/volume/extend_volume.rb
fog-openstack-0.1.5 lib/fog/openstack/requests/volume/extend_volume.rb
fog-openstack-0.1.4 lib/fog/openstack/requests/volume/extend_volume.rb
fog-openstack-0.1.3 lib/fog/openstack/requests/volume/extend_volume.rb
fog-openstack-0.1.2 lib/fog/openstack/requests/volume/extend_volume.rb
fog-openstack-0.1.1 lib/fog/openstack/requests/volume/extend_volume.rb
fog-openstack-0.1.0 lib/fog/openstack/requests/volume/extend_volume.rb
fog-1.37.0 lib/fog/openstack/requests/volume/extend_volume.rb