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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f9914dd5c0e1e96a19ba3b68ac0c780d81030ca
|
4
|
+
data.tar.gz: d24d0af3b1d56f84e38ead8b895f7bcce9b85f65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30a9a3e076a8077f1f11b8a056b945e1fb89609a46883d54889ce7c447b06d356a78f9239528c554f376f72cd1da7a1e3124942cb245d72ab06d41b9be97ba97
|
7
|
+
data.tar.gz: e415fc4f2443bee85680c43c37bf9baae2a6907bda02fded340485dee295aa5def82f77c289408744a194936dd1a43b3f4677fad90306858f2e2a3bb611aded5
|
data/CHANGELOG.md
CHANGED
@@ -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
|
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.
|
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
|