Sha256: 3b06ecc4a81730ac5aa34c920409e08376ffc0966e061448c1e742c6562d477e

Contents?: true

Size: 1.64 KB

Versions: 32

Compression:

Stored size: 1.64 KB

Contents

module Fog
  module Compute
    class OpenStack
      class Real

        def list_flavors_detail
          request(
            :expects  => [200, 203],
            :method   => 'GET',
            :path     => 'flavors/detail.json'
          )
        end

      end

      class Mock

        def list_flavors_detail
          response = Excon::Response.new
          response.status = 200
          response.body = {
            'flavors' => [
              { 'id' => '1', 'name' => '256 server', 'ram' => 256, 'disk' => 10, 'swap' => '1', 'vcpus' => 1, 'OS-FLV-EXT-DATA:ephemeral' => 1, 'links' => [] },
              { 'id' => '2', 'name' => '512 server', 'ram' => 512, 'disk' => 20, 'swap' => '1', 'vcpus' => 2, 'OS-FLV-EXT-DATA:ephemeral' => 1, 'links' => [] },
              { 'id' => '3', 'name' => '1GB server', 'ram' => 1024, 'disk' => 40, 'swap' => '2', 'vcpus' => 2, 'OS-FLV-EXT-DATA:ephemeral' => 1, 'links' => [] },
              { 'id' => '4', 'name' => '2GB server', 'ram' => 2048, 'disk' => 80, 'swap' => '4', 'vcpus' => 4, 'OS-FLV-EXT-DATA:ephemeral' => 1, 'links' => [] },
              { 'id' => '5', 'name' => '4GB server', 'ram' => 4096, 'disk' => 160, 'swap' => '8', 'vcpus' => 8, 'OS-FLV-EXT-DATA:ephemeral' => 1, 'links' => [] },
              { 'id' => '6', 'name' => '8GB server', 'ram' => 8192, 'disk' => 320, 'swap' => '16', 'vcpus' => 16, 'OS-FLV-EXT-DATA:ephemeral' => 1, 'links' => [] },
              { 'id' => '7', 'name' => '15.5GB server', 'ram' => 15872, 'disk' => 620, 'swap' => '32', 'vcpus' => 32, 'OS-FLV-EXT-DATA:ephemeral' => 1, 'links' => [] }
            ]
          }
          response
        end

      end
    end
  end
end

Version data entries

32 entries across 32 versions & 11 rubygems

Version Path
cifrado-0.2.1 vendor/fog/lib/fog/openstack/requests/compute/list_flavors_detail.rb
cifrado-0.2.0 vendor/fog/lib/fog/openstack/requests/compute/list_flavors_detail.rb
fog-1.12.1 lib/fog/openstack/requests/compute/list_flavors_detail.rb
fog-1.12.0 lib/fog/openstack/requests/compute/list_flavors_detail.rb
hpfog-0.0.20 lib/fog/openstack/requests/compute/list_flavors_detail.rb
vagrant-shell-0.2.6 vendor/bundle/gems/fog-1.10.1/lib/fog/openstack/requests/compute/list_flavors_detail.rb
vagrant-shell-0.2.5 vendor/bundle/gems/fog-1.10.1/lib/fog/openstack/requests/compute/list_flavors_detail.rb
fog-nirvanix-1.8.2 lib/fog/openstack/requests/compute/list_flavors_detail.rb
fog-1.11.1 lib/fog/openstack/requests/compute/list_flavors_detail.rb
fog-1.11.0 lib/fog/openstack/requests/compute/list_flavors_detail.rb
fog-nirvanix-1.8.1 lib/fog/openstack/requests/compute/list_flavors_detail.rb
fog-1.10.1 lib/fog/openstack/requests/compute/list_flavors_detail.rb
fog-parser-fix-1.6.1 lib/fog/openstack/requests/compute/list_flavors_detail.rb
fog-test-again-1.6.0 lib/fog/openstack/requests/compute/list_flavors_detail.rb
fog-test-me-1.10.0 lib/fog/openstack/requests/compute/list_flavors_detail.rb
fog-parser-fix-1.6.0 lib/fog/openstack/requests/compute/list_flavors_detail.rb
cifrado-0.1.3 vendor/fog/lib/fog/openstack/requests/compute/list_flavors_detail.rb
fog-1.10.0 lib/fog/openstack/requests/compute/list_flavors_detail.rb
cifrado-0.1.2 vendor/fog/lib/fog/openstack/requests/compute/list_flavors_detail.rb
cifrado-0.1.1 vendor/fog/lib/fog/openstack/requests/compute/list_flavors_detail.rb