beaker-vcloud 0.4.0 → 1.0.0

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: c9944106974d81daeba568ce19a3fcf839e5b6ff
4
- data.tar.gz: 8fa81832fdd04b191f1d33a09cbaaf193546112b
3
+ metadata.gz: 8af75809328c75f1f85d9582fa590d6c16dad769
4
+ data.tar.gz: 4d8014fef281b866c5265d1f441500bc0be5be85
5
5
  SHA512:
6
- metadata.gz: 53d967fecc5ccfe9fc28eec9aad0116ff22c020a827b0b9691d999182f943d8748a6882407d61ca85b9adc6ebddd9367b9e7979a9b76bc988bda898119032c31
7
- data.tar.gz: 8468a5544f1d63343d01c0eeec73b9b8ec83d738e522f5299204db6bd1b4e53bd428c85f9be6b073a4c30db2b7e63c16e6f9e2163badd1b2ea0afc204f2cfc62
6
+ metadata.gz: f671521de7f65d8eb8f35634b88a38f7c7627f4b1d82475eec2660974e34bda8e4bdc7ae6270acbd7147f44ebe921473f068345e6e78b73312b49498bc5fa432
7
+ data.tar.gz: 536814a0ce51837726ea3f65c6c4c6789172ed2332af37edcc2fbb7b675198ca354073c065ba2193c2d25dee06c52a9036f54d1194017cf7a925a0f66ec03fae
data/README.md CHANGED
@@ -2,20 +2,32 @@
2
2
 
3
3
  Beaker library to use vcloud hypervisor
4
4
 
5
+ # Legacy VMPooler Fallback
6
+
7
+ In previous versions of this hypervisor, a shim was added to ease internal transition to a new hypervisor called vmpooler. This shim would automatically and silently promote hosts with `hypervisor: vcloud` to use the beaker-vmpooler hypervisor if certain conditions were met: the hosts file contained a `CONFIG[:pooling_api]` and not the otherwise required `:datacenter`. This fallback behavior is no longer supported; if applicable, you will see a warning message with upgrade instructions.
8
+
5
9
  # How to use this wizardry
6
10
 
7
- This is a gem that allows you to use hosts of vcloud hypervisor with [beaker](https://github.com/puppetlabs/beaker). One thing to note is that if you are using a `pooling api` in your hosts file, beaker-vcloud will automatically switch to [beaker-vmpooler](https://github.com/puppetlabs/beaker-vmpooler).
11
+ This is a gem that allows you to use hosts of vcloud hypervisor with [beaker](https://github.com/puppetlabs/beaker).
12
+
13
+ Beaker will automatically load the appropriate hypervisors for any given hosts file, so as long as your project dependencies are satisfied there's nothing else to do. No need to `require` this library in your tests.
14
+
15
+ ## With Beaker 3.x
8
16
 
9
- ### Right Now? (beaker 3.x)
17
+ This library is included as a dependency of Beaker 3.x versions, so there's nothing to do.
10
18
 
11
- This gem is already included as [beaker dependency](https://github.com/puppetlabs/beaker/blob/master/beaker.gemspec) for you, so you don't need to do anything special to use this gem's functionality with beaker.
19
+ ## With Beaker 4.x
12
20
 
13
- ### In beaker's Next Major Version? (beaker 4.x)
21
+ As of Beaker 4.0, all hypervisor and DSL extension libraries have been removed and are no longer dependencies. In order to use a specific hypervisor or DSL extension library in your project, you will need to include them alongside Beaker in your Gemfile or project.gemspec. E.g.
14
22
 
15
- In beaker's next major version, the requirement for beaker-vcloud will be pulled
16
- from that repo. When that happens, then the usage pattern will change. In order
17
- to use this then, you'll need to include beaker-vcloud as a dependency right
18
- next to beaker itself.
23
+ ~~~ruby
24
+ # Gemfile
25
+ gem 'beaker', '~>4.0'
26
+ gem 'beaker-vcloud'
27
+ # project.gemspec
28
+ s.add_runtime_dependency 'beaker', '~>4.0'
29
+ s.add_runtime_dependency 'beaker-vcloud'
30
+ ~~~
19
31
 
20
32
  # Contributing
21
33
 
@@ -38,7 +38,6 @@ Gem::Specification.new do |s|
38
38
  # Run time dependencies
39
39
  s.add_runtime_dependency 'stringify-hash', '~> 0.0.0'
40
40
  s.add_runtime_dependency 'rbvmomi', '~> 1.9'
41
- s.add_runtime_dependency 'beaker-vmpooler'
42
41
  s.add_runtime_dependency 'beaker-vmware'
43
42
 
44
43
  end
@@ -1,3 +1,3 @@
1
1
  module BeakerVcloud
2
- VERSION = '0.4.0'
2
+ VERSION = '1.0.0'
3
3
  end
@@ -1,5 +1,4 @@
1
1
  require 'yaml' unless defined?(YAML)
2
- require 'beaker/hypervisor/vmpooler'
3
2
  require 'beaker/hypervisor/vsphere_helper'
4
3
  require 'rbvmomi'
5
4
 
@@ -7,14 +6,13 @@ module Beaker
7
6
  class Vcloud < Beaker::Hypervisor
8
7
 
9
8
  def self.new(vcloud_hosts, options)
10
- # Deprecation warning for pre-vmpooler style hosts configuration.
9
+ # Warning for pre-vmpooler style hosts configuration. TODO: remove this eventually.
11
10
  if options['pooling_api'] && !options['datacenter']
12
11
  options[:logger].warn "It looks like you may be trying to access vmpooler with `hypervisor: vcloud`. "\
13
- "This functionality has been deprecated. Please transition to `hypervisor: vmpooler`."
14
- Beaker::Vmpooler.new(vcloud_hosts, options)
15
- else
16
- super
12
+ "This functionality has been removed. Change your hosts to `hypervisor: vmpooler` "\
13
+ "and remove unused :datacenter, :folder, and :datastore from CONFIG."
17
14
  end
15
+ super
18
16
  end
19
17
 
20
18
  def initialize(vcloud_hosts, options)
@@ -20,22 +20,20 @@ module Beaker
20
20
 
21
21
  describe "#provision" do
22
22
 
23
- it 'warns about deprecated behavior if pooling_api and not datacenter is provided' do
23
+ it 'warns about deprecated behavior if pooling_api is provided' do
24
24
  opts = make_opts
25
25
  opts[:pooling_api] = 'testpool'
26
- # this shim taken from vmpooler_spec.rb
27
- allow_any_instance_of( Beaker::Vmpooler ).to \
28
- receive( :load_credentials ).and_return( fog_file_contents )
29
26
  expect( opts[:logger] ).to receive( :warn ).once
30
- Beaker::Vcloud.new( make_hosts, opts )
27
+ expect{ Beaker::Vcloud.new( make_hosts, opts ) }.to raise_error( /datacenter/ )
31
28
  end
32
- it 'instantiates vmpooler if pooling_api and not datacenter is provided' do
29
+
30
+ it 'does not instantiate vmpooler if pooling_api is provided' do
33
31
  opts = make_opts
34
32
  opts[:pooling_api] = 'testpool'
35
- hypervisor = Beaker::Vcloud.new( make_hosts, opts )
36
- expect( hypervisor.class ).to be Beaker::Vmpooler
33
+ expect{ Beaker::Vcloud.new( make_hosts, opts ) }.to raise_error( /datacenter/ )
37
34
  end
38
- it 'instantiates self if datacenter is provided' do
35
+
36
+ it 'ignores pooling_api and instantiates self' do
39
37
  opts = make_opts
40
38
  opts[:pooling_api] = 'testpool'
41
39
  opts[:datacenter] = 'testdatacenter'
@@ -1,9 +1,7 @@
1
1
  require 'simplecov'
2
2
  require 'rspec/its'
3
3
  require 'beaker'
4
- require 'beaker/hypervisor/vmpooler'
5
-
6
- Dir.glob(Dir.pwd + '/lib/beaker/hypervisor/*.rb') {|file| require file}
4
+ require 'beaker/hypervisor/vcloud'
7
5
 
8
6
  # setup & require beaker's spec_helper.rb
9
7
  beaker_gem_spec = Gem::Specification.find_by_name('beaker')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beaker-vcloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rishi Javia, Kevin Imber, Tony Vu
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-03 00:00:00.000000000 Z
11
+ date: 2018-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -164,20 +164,6 @@ dependencies:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
166
  version: '1.9'
167
- - !ruby/object:Gem::Dependency
168
- name: beaker-vmpooler
169
- requirement: !ruby/object:Gem::Requirement
170
- requirements:
171
- - - ">="
172
- - !ruby/object:Gem::Version
173
- version: '0'
174
- type: :runtime
175
- prerelease: false
176
- version_requirements: !ruby/object:Gem::Requirement
177
- requirements:
178
- - - ">="
179
- - !ruby/object:Gem::Version
180
- version: '0'
181
167
  - !ruby/object:Gem::Dependency
182
168
  name: beaker-vmware
183
169
  requirement: !ruby/object:Gem::Requirement