fog-sakuracloud 1.3.1 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e348c6a6343283d64699fc5bc4b01ce7b4785092
4
- data.tar.gz: 22b664eb56c0bda45a3be2bcf385fa8d25295a73
3
+ metadata.gz: 3f9914dd5c0e1e96a19ba3b68ac0c780d81030ca
4
+ data.tar.gz: d24d0af3b1d56f84e38ead8b895f7bcce9b85f65
5
5
  SHA512:
6
- metadata.gz: c739636d7fc04ad54e6d31da57411f6d53815165f4a9d42541c7fa5e3145d4daf160f47a5b12561e4a8d47c9211b054f4d541c308370cf9d95b15efe0fae9312
7
- data.tar.gz: 544fa5bfb1f86b26873ebdbe8197a92129bf4ad046cc40b47eb9f5dc7b155b0cf59fa8ccf46cf41c474dd8936a5f05ceb2b0b5c0032c69f7ed3d0c6b47cacb63
6
+ metadata.gz: 30a9a3e076a8077f1f11b8a056b945e1fb89609a46883d54889ce7c447b06d356a78f9239528c554f376f72cd1da7a1e3124942cb245d72ab06d41b9be97ba97
7
+ data.tar.gz: e415fc4f2443bee85680c43c37bf9baae2a6907bda02fded340485dee295aa5def82f77c289408744a194936dd1a43b3f4677fad90306858f2e2a3bb611aded5
@@ -1,5 +1,9 @@
1
1
  # Changelog of fog-sakuracloud
2
2
 
3
+ ## v1.3.2
4
+
5
+ - Feature: Set hostname (Disk#carve_hostname_on_disk)
6
+
3
7
  ## v1.3.1
4
8
 
5
9
  - Feature: Add simple setter to ResourceRecordSets
@@ -32,6 +32,12 @@ module Fog
32
32
  true
33
33
  end
34
34
 
35
+ def carve_hostname_on_disk(hostname)
36
+ requires :id
37
+ service.carve_hostname_on_disk(@attributes[:id], hostname )
38
+ true
39
+ end
40
+
35
41
  def associate_ip(ipaddress, networkmasklen, defaultroute)
36
42
  subnet ={
37
43
  :ipaddress => ipaddress,
@@ -0,0 +1,34 @@
1
+ # coding: utf-8
2
+
3
+ module Fog
4
+ module Volume
5
+ class SakuraCloud
6
+ class Real
7
+ def carve_hostname_on_disk( disk_id, hostname )
8
+ body = {
9
+ "HostName" => hostname
10
+ }
11
+
12
+ request(
13
+ :headers => {
14
+ 'Authorization' => "Basic #{@auth_encord}"
15
+ },
16
+ :expects => [200],
17
+ :method => 'PUT',
18
+ :path => "#{Fog::SakuraCloud::SAKURACLOUD_API_ENDPOINT}/disk/#{disk_id.to_s}/config",
19
+ :body => Fog::JSON.encode(body)
20
+ )
21
+ end
22
+ end # Real
23
+
24
+ class Mock
25
+ def carve_hostname_on_disk( disk_id, hostname )
26
+ response = Excon::Response.new
27
+ response.status = 200
28
+ response.body = {"Success"=>true, "is_ok"=>true}
29
+ response
30
+ end
31
+ end
32
+ end # SakuraCloud
33
+ end # Volume
34
+ end # Fog
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module Sakuracloud
3
- VERSION = "1.3.1"
3
+ VERSION = "1.3.2"
4
4
  end
5
5
  end
@@ -24,6 +24,7 @@ module Fog
24
24
  request :attach_disk
25
25
  request :delete_disk
26
26
  request :list_archives
27
+ request :carve_hostname_on_disk
27
28
 
28
29
  class Real
29
30
  def initialize(options = {})
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fog-sakuracloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - sawanoboly
@@ -267,6 +267,7 @@ files:
267
267
  - lib/fog/sakuracloud/requests/script/modify_note.rb
268
268
  - lib/fog/sakuracloud/requests/volume/associate_ip_to_disk.rb
269
269
  - lib/fog/sakuracloud/requests/volume/attach_disk.rb
270
+ - lib/fog/sakuracloud/requests/volume/carve_hostname_on_disk.rb
270
271
  - lib/fog/sakuracloud/requests/volume/configure_disk.rb
271
272
  - lib/fog/sakuracloud/requests/volume/create_disk.rb
272
273
  - lib/fog/sakuracloud/requests/volume/delete_disk.rb