vagrant-ovirt3 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vagrant-ovirt3/action/create_vm.rb +2 -2
- data/lib/vagrant-ovirt3/cap/nic_mac_addresses.rb +15 -0
- data/lib/vagrant-ovirt3/config.rb +1 -1
- data/lib/vagrant-ovirt3/errors.rb +4 -0
- data/lib/vagrant-ovirt3/plugin.rb +6 -0
- data/lib/vagrant-ovirt3/version.rb +1 -1
- data/locales/en.yml +2 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1fb362eeebf30f0e1d109ce52d8bb8a029ab3691
|
4
|
+
data.tar.gz: 198805928ad0a94bd360c73a4f125e9de6788804
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d9cbe468e42a106b64e76ab71560241f4d0f64560fc5cefe0832d464afe73d259caace72c96b1acf28938c9c5a4ffa5e16d35e5cb89c3a78433f37421fbe8e4
|
7
|
+
data.tar.gz: 28e7e1569c41e43a9189adffb96fd918321127aad4db721bf795dcfc62090786e98a530549c79b81b848c48b34bdff96994a841aec8cc239acf5c8c0c5fb0cb9
|
@@ -32,7 +32,7 @@ module VagrantPlugins
|
|
32
32
|
cluster = OVirtProvider::Util::Collection.find_matching(
|
33
33
|
env[:ovirt_compute].clusters.all, config.cluster)
|
34
34
|
end
|
35
|
-
raise
|
35
|
+
raise Errors::NoClusterError if cluster == nil
|
36
36
|
# TODO fill env also with other ovirtoptions.
|
37
37
|
env[:ovirt_cluster] = cluster
|
38
38
|
|
@@ -47,7 +47,7 @@ module VagrantPlugins
|
|
47
47
|
cv.nil? or (cv.to_i == v.version_number.to_i or cv == v.version_name)
|
48
48
|
}
|
49
49
|
if template == nil
|
50
|
-
raise
|
50
|
+
raise Errors::NoTemplateError,
|
51
51
|
:template_name => config.template
|
52
52
|
end
|
53
53
|
ver = template.raw.version
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# vim: ai ts=2 sts=2 et sw=2 ft=ruby
|
2
|
+
module VagrantPlugins
|
3
|
+
module OVirtProvider
|
4
|
+
module Cap
|
5
|
+
module NicMacAddresses
|
6
|
+
def self.nic_mac_addresses(machine)
|
7
|
+
ovirt = OVirtProvider.ovirt_connection
|
8
|
+
interfaces = ovirt.list_vm_interfaces(machine.id.to_s)
|
9
|
+
Hash[interfaces.map{ |i| [i[:name], i[:mac]] }]
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# vim: ai ts=2 sts=2 et sw=2 ft=ruby
|
1
2
|
begin
|
2
3
|
require 'vagrant'
|
3
4
|
rescue LoadError
|
@@ -33,6 +34,11 @@ module VagrantPlugins
|
|
33
34
|
Provider
|
34
35
|
end
|
35
36
|
|
37
|
+
provider_capability("ovirt3", :nic_mac_addresses) do
|
38
|
+
require_relative "cap/nic_mac_addresses"
|
39
|
+
Cap::NicMacAddresses
|
40
|
+
end
|
41
|
+
|
36
42
|
# This initializes the internationalization strings.
|
37
43
|
def self.setup_i18n
|
38
44
|
I18n.load_path << File.expand_path("locales/en.yml",
|
data/locales/en.yml
CHANGED
@@ -40,6 +40,8 @@ en:
|
|
40
40
|
errors:
|
41
41
|
fog_ovirt_connection_error: |-
|
42
42
|
Error while connecting to oVirt: %{error_message}
|
43
|
+
console_error: |-
|
44
|
+
Invalid console type specified.
|
43
45
|
no_datacenter_error: |-
|
44
46
|
No usable datacenter found! Please check if datacenter specified in
|
45
47
|
configuration is avaliable.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-ovirt3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcus Young
|
@@ -96,6 +96,7 @@ files:
|
|
96
96
|
- lib/vagrant-ovirt3/action/suspend_vm.rb
|
97
97
|
- lib/vagrant-ovirt3/action/sync_folders.rb
|
98
98
|
- lib/vagrant-ovirt3/action/wait_till_up.rb
|
99
|
+
- lib/vagrant-ovirt3/cap/nic_mac_addresses.rb
|
99
100
|
- lib/vagrant-ovirt3/config.rb
|
100
101
|
- lib/vagrant-ovirt3/errors.rb
|
101
102
|
- lib/vagrant-ovirt3/plugin.rb
|