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 +4 -4
- data/Gemfile.lock +1 -1
- data/Vagrantfile +7 -4
- data/lib/vagrant_abiquo/actions/create.rb +9 -9
- data/lib/vagrant_abiquo/actions/delete_vapp.rb +1 -1
- data/lib/vagrant_abiquo/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb4e419f31ba7254fd0f0285c7aa50bc92fe66b1
|
4
|
+
data.tar.gz: 245dbe7474ea7e9a8cade186555fa3b407b73b8b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fdd2327cedf70864d8747ef649ec02500baeabfafee98a4b311524b18d30eceafb5ac11d2da4675c5e35baacd7337115a511e02a109510a47e4ada333a9a6f3f
|
7
|
+
data.tar.gz: 8d33d3d389ec4725e2895c524e6ff5bf99a1e3a45b2902e40c511aa0541d0327d0192b0a161388f927423ee90888f3edd92982389322d124c65fabdb9e9449bc
|
data/Gemfile.lock
CHANGED
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
|
-
|
7
|
-
|
8
|
-
|
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 = '
|
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?
|
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?
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
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
|
-
|
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
|
-
|
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
|
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.
|
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-
|
12
|
+
date: 2017-04-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: abiquo-api
|