Sha256: 2159f09d380f6fa348591a81df204c2745d22f60ad6feb484ebb95d869484889

Contents?: true

Size: 1.14 KB

Versions: 29

Compression:

Stored size: 1.14 KB

Contents

module Fog
  module CDN
    class HP
      class Real
        # List existing cdn-enabled storage containers
        #
        # ==== Parameters
        # * options<~Hash>:
        #   * 'enabled_only'<~Boolean> - Set to true to limit results to cdn enabled containers
        #   * 'limit'<~Integer> - Upper limit to number of results returned
        #   * 'marker'<~String> - Only return objects with name greater than this value
        #
        # ==== Returns
        # * response<~Excon::Response>:
        #   * body<~Array>:
        #     * container<~String>: Name of container
        def get_containers(options = {})
          response = request(
            :expects  => [200, 204],
            :method   => 'GET',
            :path     => '',
            :query    => {'format' => 'json'}.merge!(options)
          )
          response
        end
      end

      class Mock # :nodoc:all
        def get_containers(options = {})
          response = Excon::Response.new
          data = self.data[:cdn_containers].map {|_,v| v}
          response.body = data
          response.status = 200
          response
        end
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 4 rubygems

Version Path
fog-1.37.0 lib/fog/hp/requests/cdn/get_containers.rb
fog-1.36.0 lib/fog/hp/requests/cdn/get_containers.rb
fog-1.35.0 lib/fog/hp/requests/cdn/get_containers.rb
fog-2.0.0.pre.0 lib/fog/hp/requests/cdn/get_containers.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-1.32.0/lib/fog/hp/requests/cdn/get_containers.rb
fog-1.34.0 lib/fog/hp/requests/cdn/get_containers.rb
fog-1.33.0 lib/fog/hp/requests/cdn/get_containers.rb
fog-1.32.0 lib/fog/hp/requests/cdn/get_containers.rb
fog-1.31.0 lib/fog/hp/requests/cdn/get_containers.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/hp/requests/cdn/get_containers.rb
fog-1.30.0 lib/fog/hp/requests/cdn/get_containers.rb
fog-1.29.0 lib/fog/hp/requests/cdn/get_containers.rb
fog-1.28.0 lib/fog/hp/requests/cdn/get_containers.rb
fog-1.27.0 lib/fog/hp/requests/cdn/get_containers.rb
fog-1.26.0 lib/fog/hp/requests/cdn/get_containers.rb
fog-1.25.0 lib/fog/hp/requests/cdn/get_containers.rb
nsidc-fog-1.24.1 lib/fog/hp/requests/cdn/get_containers.rb
fog-1.24.0 lib/fog/hp/requests/cdn/get_containers.rb
ns-fog-1.22.11 lib/fog/hp/requests/cdn/get_containers.rb
ns-fog-1.22.10 lib/fog/hp/requests/cdn/get_containers.rb