Sha256: 656cf3d01a98a5d264a65deec261cf8ec3498361d28a716820a7518de0d94a09

Contents?: true

Size: 1.14 KB

Versions: 29

Compression:

Stored size: 1.14 KB

Contents

# coding: utf-8

module Fog
  module Compute
    class SakuraCloud
      class Real
        def list_plans(options = {})
          request(
            :headers => {
              'Authorization' => "Basic #{@auth_encord}"
            },
            :method => 'GET',
            :path => "#{Fog::SakuraCloud::SAKURACLOUD_API_ENDPOINT}/product/server"
          )
        end
      end

      class Mock
        def list_plans(options = {})
          response = Excon::Response.new
          response.status = 200
          response.body = {
          "ServerPlans" =>
            [
            {"Index"=>0,
              "ID"=>1001,
              "Name"=>"プラン/1Core-1GB",
              "CPU"=>1,
              "MemoryMB"=>1024,
              "ServiceClass"=>"cloud/plan/1core-1gb",
              "Availability"=>"available"},
            {"Index"=>1,
              "ID"=>2001,
              "Name"=>"プラン/1Core-2GB",
              "CPU"=>1,
              "MemoryMB"=>2048,
              "ServiceClass"=>"cloud/plan/1core-2gb",
              "Availability"=>"available"}
            ]
          }
          response
        end
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 4 rubygems

Version Path
fog-sakuracloud-1.3.2 lib/fog/sakuracloud/requests/compute/list_plans.rb
fog-sakuracloud-1.3.1 lib/fog/sakuracloud/requests/compute/list_plans.rb
fog-sakuracloud-1.3.0 lib/fog/sakuracloud/requests/compute/list_plans.rb
fog-sakuracloud-1.2.0 lib/fog/sakuracloud/requests/compute/list_plans.rb
fog-sakuracloud-1.1.1 lib/fog/sakuracloud/requests/compute/list_plans.rb
fog-sakuracloud-1.1.0 lib/fog/sakuracloud/requests/compute/list_plans.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-sakuracloud-1.0.1/lib/fog/sakuracloud/requests/compute/list_plans.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/sakuracloud/requests/compute/list_plans.rb
fog-sakuracloud-1.0.1 lib/fog/sakuracloud/requests/compute/list_plans.rb
fog-sakuracloud-1.0.0 lib/fog/sakuracloud/requests/compute/list_plans.rb
fog-sakuracloud-0.1.2 lib/fog/sakuracloud/requests/compute/list_plans.rb
fog-sakuracloud-0.1.1 lib/fog/sakuracloud/requests/compute/list_plans.rb
fog-sakuracloud-0.1.0 lib/fog/sakuracloud/requests/compute/list_plans.rb
fog-sakuracloud-0.0.4 lib/fog/sakuracloud/requests/compute/list_plans.rb
fog-sakuracloud-0.0.3 lib/fog/sakuracloud/requests/compute/list_plans.rb
fog-sakuracloud-0.0.1 lib/fog/sakuracloud/requests/compute/list_plans.rb
ns-fog-1.22.11 lib/fog/sakuracloud/requests/compute/list_plans.rb
ns-fog-1.22.10 lib/fog/sakuracloud/requests/compute/list_plans.rb
ns-fog-1.22.9 lib/fog/sakuracloud/requests/compute/list_plans.rb
ns-fog-1.22.8 lib/fog/sakuracloud/requests/compute/list_plans.rb