fog-scaleway 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/fog-scaleway.gemspec +0 -2
- data/lib/fog/scaleway/account.rb +4 -3
- data/lib/fog/scaleway/client.rb +5 -4
- data/lib/fog/scaleway/compute.rb +6 -5
- data/lib/fog/scaleway/models/compute/servers.rb +0 -1
- data/lib/fog/scaleway/requests/compute/create_server.rb +1 -1
- data/lib/fog/scaleway/requests/compute/delete_image.rb +1 -1
- data/lib/fog/scaleway/requests/compute/delete_volume.rb +1 -1
- data/lib/fog/scaleway/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b1d7d2673388f2dc8e5bfbb0473221e75c85faf0
|
4
|
+
data.tar.gz: 6bcd387f1f0831c3b637f062c4b2d370f4e9e24f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f61d0c7c3aeb85e2af10b5b6673fd87cfbd940c293f382db1e6e174a68b897a0746de80941674a9c46689cbe71c0345c892639b798f53bebe7b39826cc7d2d7b
|
7
|
+
data.tar.gz: 822310176f0921c1bc1eb46aced26550c28ef36efd6fe189c8c13e11cfea95b24e8448b5c825d951de51c381e0d3542a2c513a4b8dc9aecc1b47d9170438bef0
|
data/fog-scaleway.gemspec
CHANGED
data/lib/fog/scaleway/account.rb
CHANGED
@@ -47,8 +47,9 @@ module Fog
|
|
47
47
|
include Fog::Scaleway::RequestHelper
|
48
48
|
|
49
49
|
def initialize(options)
|
50
|
-
@token
|
51
|
-
@email
|
50
|
+
@token = options[:scaleway_token]
|
51
|
+
@email = options[:scaleway_email]
|
52
|
+
@connection_options = options[:connection_options] || {}
|
52
53
|
end
|
53
54
|
|
54
55
|
def request(params)
|
@@ -73,7 +74,7 @@ module Fog
|
|
73
74
|
private
|
74
75
|
|
75
76
|
def client
|
76
|
-
@client ||= Fog::Scaleway::Client.new('https://account.scaleway.com', @token)
|
77
|
+
@client ||= Fog::Scaleway::Client.new('https://account.scaleway.com', @token, @connection_options)
|
77
78
|
end
|
78
79
|
|
79
80
|
def camelize(str)
|
data/lib/fog/scaleway/client.rb
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
module Fog
|
2
2
|
module Scaleway
|
3
3
|
class Client
|
4
|
-
def initialize(endpoint, token)
|
5
|
-
@endpoint
|
6
|
-
@token
|
4
|
+
def initialize(endpoint, token, connection_options)
|
5
|
+
@endpoint = endpoint
|
6
|
+
@token = token
|
7
|
+
@connection_options = connection_options
|
7
8
|
end
|
8
9
|
|
9
10
|
def request(params)
|
@@ -23,7 +24,7 @@ module Fog
|
|
23
24
|
private
|
24
25
|
|
25
26
|
def connection
|
26
|
-
@connection ||= Fog::Core::Connection.new(@endpoint)
|
27
|
+
@connection ||= Fog::Core::Connection.new(@endpoint, false, @connection_options)
|
27
28
|
end
|
28
29
|
|
29
30
|
def encode_body(params)
|
data/lib/fog/scaleway/compute.rb
CHANGED
@@ -118,9 +118,10 @@ module Fog
|
|
118
118
|
include Fog::Scaleway::RequestHelper
|
119
119
|
|
120
120
|
def initialize(options)
|
121
|
-
@token
|
122
|
-
@organization
|
123
|
-
@region
|
121
|
+
@token = options[:scaleway_token]
|
122
|
+
@organization = options[:scaleway_organization]
|
123
|
+
@region = options[:scaleway_region] || 'par1'
|
124
|
+
@connection_options = options[:connection_options] || {}
|
124
125
|
end
|
125
126
|
|
126
127
|
def request(params)
|
@@ -145,7 +146,7 @@ module Fog
|
|
145
146
|
private
|
146
147
|
|
147
148
|
def client
|
148
|
-
@client ||= Fog::Scaleway::Client.new(endpoint, @token)
|
149
|
+
@client ||= Fog::Scaleway::Client.new(endpoint, @token, @connection_options)
|
149
150
|
end
|
150
151
|
|
151
152
|
def endpoint
|
@@ -335,7 +336,7 @@ module Fog
|
|
335
336
|
security_group = lookup(:security_groups, server['security_group']['id'])
|
336
337
|
security_group['servers'].reject! { |s| s['id'] == server['id'] }
|
337
338
|
|
338
|
-
server['volumes'].
|
339
|
+
server['volumes'].each_value do |volume|
|
339
340
|
volume['server'] = nil
|
340
341
|
delete_volume(volume['id'])
|
341
342
|
end
|
@@ -127,7 +127,7 @@ module Fog
|
|
127
127
|
|
128
128
|
data[:volumes][server['volumes']['0']['id']] = server['volumes']['0']
|
129
129
|
|
130
|
-
server['volumes'].
|
130
|
+
server['volumes'].each_value do |volume|
|
131
131
|
volume['server'] = {
|
132
132
|
'id' => server['id'],
|
133
133
|
'name' => server['name']
|
data/lib/fog/scaleway/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fog-scaleway
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Satoshi Matsumoto
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|