beaker-vcloud 0.3.0 → 0.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 34b25be97b1bd4227cc5e948afab70cd2a7688fa
4
- data.tar.gz: 8ad90b126127596deed42088bb2b7c1a9ff515bd
3
+ metadata.gz: c9944106974d81daeba568ce19a3fcf839e5b6ff
4
+ data.tar.gz: 8fa81832fdd04b191f1d33a09cbaaf193546112b
5
5
  SHA512:
6
- metadata.gz: a091782086e655ce999856574b3fd33c902f835a82be02e5ee3d5ae0769dc8fb4dc76a159511a32eb09c2b8bb4686eba8e6abe398bce49b91c2fb0265b0377bd
7
- data.tar.gz: 599120c239a8ef0708d131336f8b721d8152a72f155b504d913423f97454e933f8f436a80fc48f31272b5d1ae1c386c38b1f38244efe0d29ef3c1e30ee641a01
6
+ metadata.gz: 53d967fecc5ccfe9fc28eec9aad0116ff22c020a827b0b9691d999182f943d8748a6882407d61ca85b9adc6ebddd9367b9e7979a9b76bc988bda898119032c31
7
+ data.tar.gz: 8468a5544f1d63343d01c0eeec73b9b8ec83d738e522f5299204db6bd1b4e53bd428c85f9be6b073a4c30db2b7e63c16e6f9e2163badd1b2ea0afc204f2cfc62
@@ -1,3 +1,3 @@
1
1
  module BeakerVcloud
2
- VERSION = '0.3.0'
2
+ VERSION = '0.4.0'
3
3
  end
@@ -25,14 +25,16 @@ module Beaker
25
25
  raise 'You must specify a datastore for vCloud instances!' unless @options['datastore']
26
26
  raise 'You must specify a folder for vCloud instances!' unless @options['folder']
27
27
  raise 'You must specify a datacenter for vCloud instances!' unless @options['datacenter']
28
- @vsphere_credentials = VsphereHelper.load_config(@options[:dot_fog])
28
+ @vcenter_credentials = get_fog_credentials(@options[:dot_fog], @options[:vcenter_instance] || :default)
29
29
  end
30
30
 
31
31
  def connect_to_vsphere
32
- @logger.notify "Connecting to vSphere at #{@vsphere_credentials[:server]}" +
33
- " with credentials for #{@vsphere_credentials[:user]}"
32
+ @logger.notify "Connecting to vSphere at #{@vcenter_credentials[:vsphere_server]}" +
33
+ " with credentials for #{@vcenter_credentials[:vsphere_username]}"
34
34
 
35
- @vsphere_helper = VsphereHelper.new( @vsphere_credentials )
35
+ @vsphere_helper = VsphereHelper.new :server => @vcenter_credentials[:vsphere_server],
36
+ :user => @vcenter_credentials[:vsphere_username],
37
+ :pass => @vcenter_credentials[:vsphere_password]
36
38
  end
37
39
 
38
40
  def wait_for_dns_resolution host, try, attempts
@@ -6,14 +6,16 @@ module Beaker
6
6
  before :each do
7
7
  MockVsphereHelper.set_config( fog_file_contents )
8
8
  MockVsphereHelper.set_vms( make_hosts() )
9
- stub_const( "VsphereHelper", MockVsphereHelper )
10
- stub_const( "Net", MockNet )
9
+ stub_const( "VsphereHelper", MockVsphereHelper )
10
+ stub_const( "Net", MockNet )
11
11
  json = double( 'json' )
12
12
  allow( json ).to receive( :parse ) do |arg|
13
13
  arg
14
14
  end
15
- stub_const( "JSON", json )
15
+ stub_const( "JSON", json )
16
16
  allow( Socket ).to receive( :getaddrinfo ).and_return( true )
17
+ allow_any_instance_of( Beaker::Shared ).to receive( :get_fog_credentials ).and_return( fog_file_contents )
18
+ allow_any_instance_of( VsphereHelper ).to receive( :new ).and_return (MockVsphereHelper)
17
19
  end
18
20
 
19
21
  describe "#provision" do
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.3.0
4
+ version: 0.4.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-06-27 00:00:00.000000000 Z
11
+ date: 2018-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec