kitchen-rackspace 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,14 @@
1
+ # 0.3.0 / 2013-12-07
2
+
3
+ ### Improvements
4
+
5
+ * Tested against, and working with, Test Kitchen 1.1.0
6
+
7
+ ### Bug Fixes
8
+
9
+ * PR [#15][] - Update default `image_id` to a current one
10
+ * PR [#15][] - Fix collision with TK 1.x; change `name` option to `server_name`
11
+
1
12
  # 0.2.0 / 2013-05-11
2
13
 
3
14
  ### New Features
@@ -13,6 +24,7 @@
13
24
 
14
25
  * Initial release! Woo!
15
26
 
27
+ [#15]: https://github.com/RoboticCheese/kitchen-rackspace/pull/15
16
28
  [#9]: https://github.com/RoboticCheese/kitchen-rackspace/pull/9
17
29
  [#8]: https://github.com/RoboticCheese/kitchen-rackspace/pull/8
18
30
  [#7]: https://github.com/RoboticCheese/kitchen-rackspace/pull/7
data/README.md CHANGED
@@ -1,4 +1,7 @@
1
- [![Build Status](https://travis-ci.org/RoboticCheese/kitchen-rackspace.png?branch=master)](https://travis-ci.org/RoboticCheese/kitchen-rackspace) [![Code Climate](https://codeclimate.com/github/RoboticCheese/kitchen-rackspace.png)](https://codeclimate.com/github/RoboticCheese/kitchen-rackspace)
1
+ [![Gem Version](https://badge.fury.io/rb/kitchen-rackspace.png)](http://badge.fury.io/rb/kitchen-rackspace)
2
+ [![Build Status](https://travis-ci.org/RoboticCheese/kitchen-rackspace.png?branch=master)](https://travis-ci.org/RoboticCheese/kitchen-rackspace)
3
+ [![Code Climate](https://codeclimate.com/github/RoboticCheese/kitchen-rackspace.png)](https://codeclimate.com/github/RoboticCheese/kitchen-rackspace)
4
+ [![Dependency Status](https://gemnasium.com/RoboticCheese/kitchen-rackspace.png)](https://gemnasium.com/RoboticCheese/kitchen-rackspace)
2
5
 
3
6
  # Kitchen::Rackspace
4
7
 
@@ -25,8 +28,8 @@ Or install it yourself as:
25
28
 
26
29
  Provide, at a minimum, the required driver options in your `.kitchen.yml` file:
27
30
 
28
- driver_plugin: rackspace
29
- driver_config:
31
+ driver:
32
+ name: rackspace
30
33
  rackspace_username: [YOUR RACKSPACE CLOUD USERNAME]
31
34
  rackspace_api_key: [YOUR RACKSPACE CLOUD API KEY]
32
35
  require_chef_omnibus: latest (if you'll be using Chef)
@@ -36,7 +39,7 @@ Rackspace region. Additional, optional settings can be provided:
36
39
 
37
40
  image_id: [SERVER IMAGE ID]
38
41
  flavor_id: [SERVER FLAVOR ID]
39
- name: [A UNIQUE SERVER NAME]
42
+ server_name: [A UNIQUE SERVER NAME]
40
43
  public_key_path: [PATH TO YOUR PUBLIC SSH KEY]
41
44
  rackspace_region: [A VALID RACKSPACE DC/REGION]
42
45
 
@@ -18,8 +18,10 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ['lib']
20
20
 
21
- spec.add_dependency 'test-kitchen', '~> 1.0.0.alpha'
22
- spec.add_dependency 'fog', '~> 1.11'
21
+ spec.add_dependency 'test-kitchen', '~> 1.1'
22
+ spec.add_dependency 'fog', '~> 1.18'
23
+ # Newer Fogs throw a warning if unf isn't there :(
24
+ spec.add_dependency 'unf'
23
25
 
24
26
  spec.add_development_dependency 'bundler'
25
27
  spec.add_development_dependency 'rake'
@@ -29,16 +29,16 @@ module Kitchen
29
29
  # @author Jonathan Hartman <j@p4nt5.com>
30
30
  class Rackspace < Kitchen::Driver::SSHBase
31
31
  default_config :version, 'v2'
32
- default_config :image_id, '8a3a9f96-b997-46fd-b7a8-a9e740796ffd'
32
+ default_config :image_id, 'd45ed9c5-d6fc-4c9d-89ea-1b3ae1c83999'
33
33
  default_config :flavor_id, '2'
34
- default_config :name, nil
34
+ default_config :server_name, nil
35
35
  default_config :public_key_path, File.expand_path('~/.ssh/id_dsa.pub')
36
36
  default_config :username, 'root'
37
37
  default_config :port, '22'
38
38
  default_config :rackspace_region, nil
39
39
 
40
40
  def create(state)
41
- config[:name] ||= generate_name(instance.name)
41
+ config[:server_name] ||= generate_name(instance.name)
42
42
  server = create_server
43
43
  state[:server_id] = server.id
44
44
  info("Rackspace instance <#{state[:server_id]}> created.")
@@ -76,7 +76,7 @@ module Kitchen
76
76
 
77
77
  def create_server
78
78
  compute.servers.bootstrap(
79
- :name => config[:name],
79
+ :name => config[:server_name],
80
80
  :image_id => config[:image_id],
81
81
  :flavor_id => config[:flavor_id],
82
82
  :public_key_path => config[:public_key_path]
@@ -19,7 +19,7 @@
19
19
  module Kitchen
20
20
  module Driver
21
21
  # Version string for Rackspace Kitchen driver
22
- RACKSPACE_VERSION = '0.2.0'
22
+ RACKSPACE_VERSION = '0.3.0'
23
23
  end
24
24
  end
25
25
 
@@ -45,7 +45,7 @@ describe Kitchen::Driver::Rackspace do
45
45
  end
46
46
 
47
47
  it 'defaults to a Ubuntu 12.10 image ID' do
48
- expect(driver[:image_id]).to eq('8a3a9f96-b997-46fd-b7a8-a9e740796ffd')
48
+ expect(driver[:image_id]).to eq('d45ed9c5-d6fc-4c9d-89ea-1b3ae1c83999')
49
49
  end
50
50
 
51
51
  it 'defaults to the smallest flavor size' do
@@ -63,7 +63,7 @@ describe Kitchen::Driver::Rackspace do
63
63
  end
64
64
 
65
65
  it 'defaults to no server name' do
66
- expect(driver[:name]).to eq(nil)
66
+ expect(driver[:server_name]).to eq(nil)
67
67
  end
68
68
 
69
69
  it 'defaults to no region' do
@@ -79,7 +79,7 @@ describe Kitchen::Driver::Rackspace do
79
79
  :public_key_path => '/tmp',
80
80
  :username => 'admin',
81
81
  :port => '2222',
82
- :name => 'puppy',
82
+ :server_name => 'puppy',
83
83
  :rackspace_region => 'ord'
84
84
  }
85
85
  end
@@ -117,7 +117,7 @@ describe Kitchen::Driver::Rackspace do
117
117
 
118
118
  it 'generates a server name in the absence of one' do
119
119
  driver.create(state)
120
- expect(driver[:name]).to eq('a_monkey!')
120
+ expect(driver[:server_name]).to eq('a_monkey!')
121
121
  end
122
122
 
123
123
  it 'gets a proper server ID' do
@@ -224,13 +224,18 @@ describe Kitchen::Driver::Rackspace do
224
224
  describe '#create_server' do
225
225
  let(:config) do
226
226
  {
227
- :name => 'hello',
227
+ :server_name => 'hello',
228
228
  :image_id => 'there',
229
229
  :flavor_id => 'captain',
230
230
  :public_key_path => 'tarpals'
231
231
  }
232
232
  end
233
- before(:each) { @config = config.dup }
233
+ before(:each) do
234
+ @expected = config.merge(:name => config[:server_name])
235
+ @expected.delete_if do |k, v|
236
+ k == :server_name
237
+ end
238
+ end
234
239
  let(:servers) do
235
240
  s = double('servers')
236
241
  s.stub(:bootstrap) { |arg| arg }
@@ -245,7 +250,7 @@ describe Kitchen::Driver::Rackspace do
245
250
  end
246
251
 
247
252
  it 'creates the server using a compute connection' do
248
- expect(driver.send(:create_server)).to eq(@config)
253
+ expect(driver.send(:create_server)).to eq(@expected)
249
254
  end
250
255
  end
251
256
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-rackspace
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-11 00:00:00.000000000 Z
12
+ date: 2013-12-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: test-kitchen
@@ -18,7 +18,7 @@ dependencies:
18
18
  requirements:
19
19
  - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: 1.0.0.alpha
21
+ version: '1.1'
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ~>
28
28
  - !ruby/object:Gem::Version
29
- version: 1.0.0.alpha
29
+ version: '1.1'
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: fog
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -34,7 +34,7 @@ dependencies:
34
34
  requirements:
35
35
  - - ~>
36
36
  - !ruby/object:Gem::Version
37
- version: '1.11'
37
+ version: '1.18'
38
38
  type: :runtime
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
@@ -42,7 +42,23 @@ dependencies:
42
42
  requirements:
43
43
  - - ~>
44
44
  - !ruby/object:Gem::Version
45
- version: '1.11'
45
+ version: '1.18'
46
+ - !ruby/object:Gem::Dependency
47
+ name: unf
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
46
62
  - !ruby/object:Gem::Dependency
47
63
  name: bundler
48
64
  requirement: !ruby/object:Gem::Requirement
@@ -186,3 +202,4 @@ summary: A Test Kitchen Rackspace driver
186
202
  test_files:
187
203
  - spec/kitchen/driver/rackspace_spec.rb
188
204
  - spec/spec_helper.rb
205
+ has_rdoc: