kitchen-scaleway 0.1.0 → 0.1.1

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: 78fa326410f141a5d106a268f94d2d749242b614
4
- data.tar.gz: ac1eccc731b39d8332557da657ed7f807dcb92cd
3
+ metadata.gz: 13a14cf6077996dbdcfee87ab668a5feca61903a
4
+ data.tar.gz: 5ee82e848805762af0b72b2d4b8ace56c4979eee
5
5
  SHA512:
6
- metadata.gz: 5c49986c1c711a1551ff7423fac4a39a67781b06f5f62e0c0e94ddbbb370f40449bbe983e87cad11c019b104d1be8dc5f0b9e7f7bda3efbb0a4d1dcb519d9ce7
7
- data.tar.gz: 3cb73de2dffb3a97ba50de35cf796db5943938b048f7a4ae3ecc203c98bff54711bc68cc92a5cf40513e28096998a38f99daac9ea22ae1b706727f300caadcbb
6
+ metadata.gz: 3c45150dfd1cc2e2c3fd037bd2d0d034e66ae83ba541dd577594466efa67d8617254119d9da3a71c92fc00336400274bfa1a77f56e1d4a750b989072e517e8a4
7
+ data.tar.gz: 401da230ec2c831151d5441cbd51b4566b12920686db3a1cc39966dd3633e5844bd22c0d876b317e976f76775f0c9de54fe0ffba74a2032b50e73758c0f10834
@@ -44,28 +44,28 @@ module Kitchen
44
44
 
45
45
  def create(state)
46
46
  client
47
- server = create_server
48
47
 
49
- state[:server_id] = server.id
50
-
51
- info("Scaleway instance <#{state[:server_id]}> created.")
48
+ if state[:server_id]
49
+ server = state[:server_id]
50
+ else
51
+ server = create_server
52
+ state[:server_id] = server.id
53
+ info("Scaleway instance <#{state[:server_id]}> created.")
54
+ loop do
55
+ info("Waiting for Public IP to become available...")
56
+ sleep 8
57
+ begin
58
+ instance = ::Scaleway::Server.find(state[:server_id])
59
+ rescue ::Scaleway::NotFound
60
+ info('instance still not ready.')
61
+ end
52
62
 
53
- loop do
54
- info("Waiting for Public IP to become available...")
55
- sleep 8
56
- begin
57
- instance = ::Scaleway::Server.find(state[:server_id])
58
- rescue ::Scaleway::NotFound
59
- info('instance still not ready.')
63
+ break if instance && ! instance.public_ip.nil?
60
64
  end
61
-
62
- break if instance && ! instance.public_ip.nil?
65
+ instance ||= ::Scaleway::Server.find(state[:server_id])
66
+ state[:hostname] = instance.public_ip[:address]
67
+ wait_for_sshd(state[:hostname]); print "(ssh ready)\n"
63
68
  end
64
- instance ||= ::Scaleway::Server.find(state[:server_id])
65
-
66
- state[:hostname] = instance.public_ip[:address]
67
-
68
- wait_for_sshd(state[:hostname]); print "(ssh ready)\n"
69
69
  end
70
70
 
71
71
  def destroy(state)
@@ -149,22 +149,23 @@ module Kitchen
149
149
 
150
150
  def platform_to_slug_mapping
151
151
  {
152
- 'debian-7.0' => 'Debian Wheezy (7.8)',
153
- 'debian-70' => 'Debian Wheezy (7.8)',
154
- 'debian-78' => 'Debian Wheezy (7.8)',
155
- 'debian-8.1' => 'Debian Jessie (8.1)',
156
- 'debian-81' => 'Debian Jessie (8.1)',
152
+ 'debian-7' => 'Debian Wheezy',
153
+ 'wheezy' => 'Debian Wheezy',
154
+ 'debian-8.1' => 'Debian Jessie',
155
+ 'debian-81' => 'Debian Jessie',
156
+ 'jessie' => 'Debian Jessie',
157
+ 'debian-sid' => 'Debian Sid',
157
158
  'fedora-22' => 'Fedora 22',
158
159
  'opensuse-13.2' => 'openSUSE 13.2',
159
160
  'opensuse-132' => 'openSUSE 13.2',
160
- 'ubuntu-12.04' => 'Ubuntu Precise (12.04)',
161
- 'ubuntu-1204' => 'Ubuntu Precise (12.04)',
162
- 'ubuntu-14.04' => 'Ubuntu Trusty (14.04 LTS)',
163
- 'ubuntu-1404' => 'Ubuntu Trusty (14.04 LTS)',
164
- 'ubuntu-14.10' => 'Ubuntu Utopic (14.10 EOL)',
165
- 'ubuntu-1410' => 'Ubuntu Utopic (14.10 EOL)',
166
- 'ubuntu-15.04' => 'Ubuntu Vivid (15.04 latest)',
167
- 'ubuntu-1504' => 'Ubuntu Vivid (15.04 latest)'
161
+ 'ubuntu-12.04' => 'Ubuntu Precise',
162
+ 'ubuntu-1204' => 'Ubuntu Precise',
163
+ 'ubuntu-14.04' => 'Ubuntu Trusty',
164
+ 'ubuntu-1404' => 'Ubuntu Trusty',
165
+ 'ubuntu-14.10' => 'Ubuntu Utopic',
166
+ 'ubuntu-1410' => 'Ubuntu Utopic',
167
+ 'ubuntu-15.04' => 'Ubuntu Vivid',
168
+ 'ubuntu-1504' => 'Ubuntu Vivid'
168
169
  }
169
170
  end
170
171
  end
@@ -21,6 +21,6 @@ module Kitchen
21
21
  module Driver
22
22
 
23
23
  # Version string for Scaleway Kitchen driver
24
- SCALEWAY_VERSION = "0.1.0"
24
+ SCALEWAY_VERSION = "0.1.1"
25
25
  end
26
26
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-scaleway
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Hass
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-01 00:00:00.000000000 Z
11
+ date: 2015-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen