Sha256: 135bcbbf6395be84a95749e6b7123a86336cbbf74036bd38231313ddac94c18b

Contents?: true

Size: 969 Bytes

Versions: 4

Compression:

Stored size: 969 Bytes

Contents

module Fog
  module Volume
    class HuaweiCloud
      module Real
        def list_volumes(options = true, options_deprecated = {})
          if options.kind_of?(Hash)
            path  = 'volumes'
            query = options
          else
            # Backwards compatibility layer, when 'detailed' boolean was sent as first param
            if options
              Fog::Logger.deprecation('Calling HuaweiCloud[:volume].list_volumes(true) is deprecated, use .list_volumes_detailed instead')
            else
              Fog::Logger.deprecation('Calling HuaweiCloud[:volume].list_volumes(false) is deprecated, use .list_volumes({}) instead')
            end
            path  = options ? 'volumes/detail' : 'volumes'
            query = options_deprecated
          end

          request(
            :expects => 200,
            :method  => 'GET',
            :path    => path,
            :query   => query
          )
        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/list_volumes.rb
fog-huaweicloud-0.0.2 lib/fog/volume/huaweicloud/requests/list_volumes.rb
fog-huaweicloud-0.1.3 lib/fog/volume/huaweicloud/requests/list_volumes.rb
fog-huaweicloud-0.1.2 lib/fog/volume/huaweicloud/requests/list_volumes.rb