Sha256: 1d5dcb3f6c57b33a7ba9036a98c060feb2a5eaa79c8dbcccb4fd9662e1eb43ec

Contents?: true

Size: 613 Bytes

Versions: 4

Compression:

Stored size: 613 Bytes

Contents

module Fog
  module Volume
    class HuaweiCloud
      module Real
        def update_volume(volume_id, data = {})
          request(
            :body    => Fog::JSON.encode('volume' => data),
            :expects => 200,
            :method  => 'PUT',
            :path    => "volumes/#{volume_id}"
          )
        end
      end

      module Mock
        def update_volume(volume_id, data = {})
          response        = Excon::Response.new
          response.status = 200
          response.body   = {'volume' => data.merge('id' => volume_id)}
          response
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fog-huaweicloud-0.0.3 lib/fog/volume/huaweicloud/requests/update_volume.rb
fog-huaweicloud-0.0.2 lib/fog/volume/huaweicloud/requests/update_volume.rb
fog-huaweicloud-0.1.3 lib/fog/volume/huaweicloud/requests/update_volume.rb
fog-huaweicloud-0.1.2 lib/fog/volume/huaweicloud/requests/update_volume.rb