Sha256: 3401031b69f43e3ff5c8da72886707072b078022695a042cba1d8ac907bc0e19

Contents?: true

Size: 844 Bytes

Versions: 21

Compression:

Stored size: 844 Bytes

Contents

# coding: utf-8

module Fog
  module Volume
    class SakuraCloud
      class Real
        def configure_disk( disk_id, sshkey_id )
          body = {
            "SSHKey" => {"ID" => sshkey_id.to_s }
          }

          request(
            :headers => {
              'Authorization' => "Basic #{@auth_encord}"
            },
            :expects  => [200],
            :method => 'PUT',
            :path => "#{Fog::SakuraCloud::SAKURACLOUD_API_ENDPOINT}/disk/#{disk_id.to_s}/config",
            :body => Fog::JSON.encode(body)
          )
        end
      end # Real

      class Mock
        def configure_disk( disk_id, sshkey_id )
          response = Excon::Response.new
          response.status = 200
          response.body = {
          }
          response
        end
      end
    end # SakuraCloud
  end # Volume
end # Fog

Version data entries

21 entries across 21 versions & 4 rubygems

Version Path
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-sakuracloud-1.0.1/lib/fog/sakuracloud/requests/volume/configure_disk.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/sakuracloud/requests/volume/configure_disk.rb
fog-sakuracloud-1.0.1 lib/fog/sakuracloud/requests/volume/configure_disk.rb
fog-sakuracloud-1.0.0 lib/fog/sakuracloud/requests/volume/configure_disk.rb
fog-sakuracloud-0.1.2 lib/fog/sakuracloud/requests/volume/configure_disk.rb
fog-sakuracloud-0.1.1 lib/fog/sakuracloud/requests/volume/configure_disk.rb
fog-sakuracloud-0.1.0 lib/fog/sakuracloud/requests/volume/configure_disk.rb
fog-sakuracloud-0.0.4 lib/fog/sakuracloud/requests/volume/configure_disk.rb
fog-sakuracloud-0.0.3 lib/fog/sakuracloud/requests/volume/configure_disk.rb
fog-sakuracloud-0.0.1 lib/fog/sakuracloud/requests/volume/configure_disk.rb
ns-fog-1.22.11 lib/fog/sakuracloud/requests/volume/configure_disk.rb
ns-fog-1.22.10 lib/fog/sakuracloud/requests/volume/configure_disk.rb
ns-fog-1.22.9 lib/fog/sakuracloud/requests/volume/configure_disk.rb
ns-fog-1.22.8 lib/fog/sakuracloud/requests/volume/configure_disk.rb
ns-fog-1.22.7 lib/fog/sakuracloud/requests/volume/configure_disk.rb
ns-fog-1.22.6 lib/fog/sakuracloud/requests/volume/configure_disk.rb
fog-1.23.0 lib/fog/sakuracloud/requests/volume/configure_disk.rb
ns-fog-1.22.4 lib/fog/sakuracloud/requests/volume/configure_disk.rb
ns-fog-1.22.3 lib/fog/sakuracloud/requests/volume/configure_disk.rb
ns-fog-1.22.2 lib/fog/sakuracloud/requests/volume/configure_disk.rb