vagrant_abiquo 0.0.5 → 0.0.6

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: 3d52459a5932c1be97b7e5d6197e5735f1b432d6
4
- data.tar.gz: 8acfc9a0a156761871e17abecd1b459efe643e1e
3
+ metadata.gz: eb4e419f31ba7254fd0f0285c7aa50bc92fe66b1
4
+ data.tar.gz: 245dbe7474ea7e9a8cade186555fa3b407b73b8b
5
5
  SHA512:
6
- metadata.gz: 3272327a7463373c99f6f40bc97e5055d7a4ded18a3faa51ca747613003bca49e8d1ee4a5e5d5d32d012f43cd16257249e68238b27256ecd64fb1c1b6118c9df
7
- data.tar.gz: 9452f08c3feb41347fca22b822b88dd07bbf0d0313345e0dd936e384692e3c17e1c284c1ff3d968e9a5ebca370dccb604b6813ecdab8d57b8f3e631a69d8765c
6
+ metadata.gz: fdd2327cedf70864d8747ef649ec02500baeabfafee98a4b311524b18d30eceafb5ac11d2da4675c5e35baacd7337115a511e02a109510a47e4ada333a9a6f3f
7
+ data.tar.gz: 8d33d3d389ec4725e2895c524e6ff5bf99a1e3a45b2902e40c511aa0541d0327d0192b0a161388f927423ee90888f3edd92982389322d124c65fabdb9e9449bc
data/Gemfile.lock CHANGED
@@ -24,7 +24,7 @@ GIT
24
24
  PATH
25
25
  remote: .
26
26
  specs:
27
- vagrant_abiquo (0.0.5)
27
+ vagrant_abiquo (0.0.6)
28
28
  abiquo-api (~> 0.1.2)
29
29
  log4r
30
30
 
data/Vagrantfile CHANGED
@@ -3,9 +3,11 @@ VAGRANTFILE_API_VERSION = "2"
3
3
  Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
4
4
  config.vm.synced_folder ".", "/vagrant", type: "rsync"
5
5
 
6
- (1..10).each do |ind|
7
- config.vm.define "abiquotesting-#{ind}"
8
- end
6
+ config.vm.define "abiquosingle"
7
+
8
+ #(1..10).each do |ind|
9
+ # config.vm.define "abiquotesting-#{ind}"
10
+ #end
9
11
 
10
12
  config.vm.provider :abiquo do |provider, override|
11
13
  override.vm.box = 'abiquo'
@@ -27,8 +29,9 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
27
29
  #provider.hwprofile = '4gb'
28
30
  provider.virtualdatacenter = 'esx'
29
31
  provider.virtualappliance = 'Vagrant Tests'
30
- provider.template = 'Alpine'
32
+ provider.template = 'Centos 7 x86_64'
31
33
 
32
34
  override.ssh.private_key_path = '~/.ssh/id_rsa'
35
+ override.ssh.username = 'centos'
33
36
  end
34
37
  end
@@ -24,7 +24,7 @@ module VagrantPlugins
24
24
 
25
25
  # Check if we have to use hwprofiles
26
26
  lim = vdc.link(:enterprise).get.link(:limits).get.select {|l| l.link(:location).title == vdc.link(:location).title }.first
27
- if lim.respond_to? :enabledHardwareProfiles
27
+ if lim.respond_to?(:enabledHardwareProfiles) && lim.enabledHardwareProfiles
28
28
  if @machine.provider_config.hwprofile.nil?
29
29
  raise Abiquo::Errors::HWprofileEnabled, vdc: @machine.provider_config.virtualdatacenter
30
30
  end
@@ -47,15 +47,15 @@ module VagrantPlugins
47
47
  vm_definition = {}
48
48
 
49
49
  # Configured CPU and RAM
50
- if lim.respond_to? :enabledHardwareProfiles
51
- # lookup the hwprofile link
52
- hwprofile = vdc.link(:location).get.link(:hardwareprofiles).get
53
- .select {|h| h.name == @machine.provider_config.hwprofile }.first
54
- raise Abiquo::Errors::HWProfileNotFound, hwprofile: @machine.provider_config.hwprofile, vdc: vdc.name if hwprofile.nil?
55
- hwprofile_lnk = hwprofile.link(:self).clone.to_hash
56
- hwprofile_lnk['rel'] = 'hardwareprofile'
50
+ if lim.respond_to?(:enabledHardwareProfiles) && lim.enabledHardwareProfiles
51
+ # lookup the hwprofile link
52
+ hwprofile = vdc.link(:location).get.link(:hardwareprofiles).get
53
+ .select {|h| h.name == @machine.provider_config.hwprofile }.first
54
+ raise Abiquo::Errors::HWProfileNotFound, hwprofile: @machine.provider_config.hwprofile, vdc: vdc.name if hwprofile.nil?
55
+ hwprofile_lnk = hwprofile.link(:self).clone.to_hash
56
+ hwprofile_lnk['rel'] = 'hardwareprofile'
57
57
 
58
- vm_definition['links'] = [ tmpl_link, hwprofile_lnk ]
58
+ vm_definition['links'] = [ tmpl_link, hwprofile_lnk ]
59
59
  else
60
60
  cpu_cores = @machine.provider_config.cpu_cores
61
61
  ram_mb = @machine.provider_config.ram_mb
@@ -28,7 +28,7 @@ module VagrantPlugins
28
28
  raise Abiquo::Errors::VDCNotFound, vdc: pconfig.virtualdatacenter if vdc.nil?
29
29
 
30
30
  vapp = get_vapp(vdc, pconfig.virtualappliance)
31
- if vapp.link(:virtualmachines).get.count == 0
31
+ unless vapp.nil? || vapp.link(:virtualmachines).get.count > 0
32
32
  @logger.info "vApp '#{pconfig.virtualappliance}' is empty, deleting."
33
33
  vapp.delete
34
34
  end
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module Abiquo
3
- VERSION = '0.0.5'
3
+ VERSION = '0.0.6'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant_abiquo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Beneyto
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-03-30 00:00:00.000000000 Z
12
+ date: 2017-04-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: abiquo-api