Sha256: 3fc9264323c30de9137e2cbde5d56937b0b8564c80cb9a3bc2d2916fa94414a2

Contents?: true

Size: 1.83 KB

Versions: 43

Compression:

Stored size: 1.83 KB

Contents

module Fog
  module Compute
    class Clodo
      class Real
        # List all images
        #
        # ==== Returns
        # * response<~Excon::Response>:
        #   * body<~Hash>:
        #     * 'os_type'<~String> - OS distribution
        #     * 'os_bits'<~Integer> - OS bits
        #     * 'os_hvm'<~Integer> - HVM flag
	#     * '_attr'<~Hash>:
        #      * 'id'<~Integer> - Id of the image
        #      * 'name'<~String> - Name of the image
        #      * 'status'<~String> - Status of the image
        #      * 'vps_type'<~String> - VirtualServer or ScaleServer

        def list_images_detail
          request(
                  :expects  => [200, 203],
                  :method   => 'GET',
                  :path     => 'images/detail'
                  )
        end
      end

      class Mock
        def list_images_detail
          response = Excon::Response.new
          response.status = 200
          response.body = {
            'images' => [{ 'os_type' => 'debian',
                           'os_bits' => "64",
                           'os_hvm' => "0",
                           '_attr' => {
                             'id' => "541",
                             'name' => 'Debian 6 64 bits',
                             'status' => 'ACTIVE',
                             'vps_type' => 'ScaleServer'
                           }},
                         { 'os_type' => 'centos',
                           'os_bits' => "32",
                           'os_hvm' => "0",
                           '_attr' => {
                             'name' => 'CentOS 5.5 32 bits',
                             'id' => "31",
                             'vps_type' => 'VirtualServer',
                             'status' => 'ACTIVE',
                           }}]
          }
          response
        end
      end
    end
  end
end

Version data entries

43 entries across 41 versions & 6 rubygems

Version Path
fog-2.3.0 lib/fog/clodo/requests/compute/list_images_detail.rb
fog-ifeel-2.2.0 lib/fog/clodo/requests/compute/list_images_detail.rb
fog-2.2.0 lib/fog/clodo/requests/compute/list_images_detail.rb
fog-2.1.0 lib/fog/clodo/requests/compute/list_images_detail.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-1.42.1/lib/fog/clodo/requests/compute/list_images_detail.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-1.42.1/lib/fog/clodo/requests/compute/list_images_detail.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-1.42.1/lib/fog/clodo/requests/compute/list_images_detail.rb
fog-1.42.1 lib/fog/clodo/requests/compute/list_images_detail.rb
fog-2.0.0 lib/fog/clodo/requests/compute/list_images_detail.rb
fog-1.42.0 lib/fog/clodo/requests/compute/list_images_detail.rb
fog-1.41.0 lib/fog/clodo/requests/compute/list_images_detail.rb
fog-1.40.0 lib/fog/clodo/requests/compute/list_images_detail.rb
fog-1.39.0 lib/fog/clodo/requests/compute/list_images_detail.rb
fog-1.38.0 lib/fog/clodo/requests/compute/list_images_detail.rb
fog-1.37.0 lib/fog/clodo/requests/compute/list_images_detail.rb
fog-1.36.0 lib/fog/clodo/requests/compute/list_images_detail.rb
fog-1.35.0 lib/fog/clodo/requests/compute/list_images_detail.rb
fog-2.0.0.pre.0 lib/fog/clodo/requests/compute/list_images_detail.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-1.32.0/lib/fog/clodo/requests/compute/list_images_detail.rb
fog-1.34.0 lib/fog/clodo/requests/compute/list_images_detail.rb