Sha256: 5ade226aa18f4d17db50e3a3be3ef3fe68ea3ea671582b06cdfe67667a5eb97e
Contents?: true
Size: 862 Bytes
Versions: 2
Compression:
Stored size: 862 Bytes
Contents
# coding: utf-8 module Fog module Volume class SakuraCloud class Real def carve_hostname_on_disk( disk_id, hostname ) body = { "HostName" => hostname } request( :headers => { 'Authorization' => "Basic #{@auth_encode}" }, :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 carve_hostname_on_disk( disk_id, hostname ) response = Excon::Response.new response.status = 200 response.body = {"Success"=>true, "is_ok"=>true} response end end end # SakuraCloud end # Volume end # Fog
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fog-sakuracloud-1.4.0 | lib/fog/sakuracloud/requests/volume/carve_hostname_on_disk.rb |
fog-sakuracloud-1.3.3 | lib/fog/sakuracloud/requests/volume/carve_hostname_on_disk.rb |