beaker-vcloud 0.4.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +20 -8
- data/beaker-vcloud.gemspec +0 -1
- data/lib/beaker-vcloud/version.rb +1 -1
- data/lib/beaker/hypervisor/vcloud.rb +4 -6
- data/spec/beaker/hypervisor/vcloud_spec.rb +7 -9
- data/spec/spec_helper.rb +1 -3
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8af75809328c75f1f85d9582fa590d6c16dad769
|
4
|
+
data.tar.gz: 4d8014fef281b866c5265d1f441500bc0be5be85
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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).
|
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
|
-
|
17
|
+
This library is included as a dependency of Beaker 3.x versions, so there's nothing to do.
|
10
18
|
|
11
|
-
|
19
|
+
## With Beaker 4.x
|
12
20
|
|
13
|
-
|
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
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
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
|
|
data/beaker-vcloud.gemspec
CHANGED
@@ -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
|
-
#
|
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
|
14
|
-
|
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
|
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
|
-
|
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
|
-
|
36
|
-
expect( hypervisor.class ).to be Beaker::Vmpooler
|
33
|
+
expect{ Beaker::Vcloud.new( make_hosts, opts ) }.to raise_error( /datacenter/ )
|
37
34
|
end
|
38
|
-
|
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'
|
data/spec/spec_helper.rb
CHANGED
@@ -1,9 +1,7 @@
|
|
1
1
|
require 'simplecov'
|
2
2
|
require 'rspec/its'
|
3
3
|
require 'beaker'
|
4
|
-
require 'beaker/hypervisor/
|
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
|
+
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-
|
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
|