Sha256: 8dccd75d1992ebd38a99724b35e43359584c769076235e4d8b5ba865756e07e7

Contents?: true

Size: 794 Bytes

Versions: 4

Compression:

Stored size: 794 Bytes

Contents

module Fog
  module Compute
    class HuaweiCloud
      class Real
        def list_volume_attachments(server_id)
          request(
            :expects => 200,
            :method  => 'GET',
            :path    => format('servers/%s/os-volume_attachments', server_id)
          )
        end
      end

      class Mock
        def list_volume_attachments(server_id)
          Excon::Response.new(
            :body   => {
              :volumeAttachments => [{
                :device   => '/dev/vdd',
                :serverId => server_id,
                :id       => '24011ca7-9937-41e4-b19b-141307d1b656',
                :volumeId => '24011ca7-9937-41e4-b19b-141307d1b656'
              }]
            },
            :status => 200
          )
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fog-huaweicloud-0.0.3 lib/fog/compute/huaweicloud/requests/list_volume_attachments.rb
fog-huaweicloud-0.0.2 lib/fog/compute/huaweicloud/requests/list_volume_attachments.rb
fog-huaweicloud-0.1.3 lib/fog/compute/huaweicloud/requests/list_volume_attachments.rb
fog-huaweicloud-0.1.2 lib/fog/compute/huaweicloud/requests/list_volume_attachments.rb