vagrant-ovirt3 1.3.0 → 1.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: fb418a1dcb47db6316ed502682775154fa41a468
4
- data.tar.gz: 0daaf7c450f4aa512caaca2375058b7120a122bf
3
+ metadata.gz: 1fb362eeebf30f0e1d109ce52d8bb8a029ab3691
4
+ data.tar.gz: 198805928ad0a94bd360c73a4f125e9de6788804
5
5
  SHA512:
6
- metadata.gz: e338380c448b4fc231fca4c5580978657f9c14e8b0aa53707951858402526f3f41802f32698ec6fab7ba4b5bfffbd7053d193e7ca92aca79f0d7d028c7308f0c
7
- data.tar.gz: c63e3b5c922a6f6c49d97a8ba5ad1ac8fa666db4ea2565bf51e5a1e9146f3140c2797c6d642245606818b201511d85182f82682e8c4af5d6c57c2a34b6b6c6b2
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 Error::NoClusterError if cluster == nil
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 Error::NoTemplateError,
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
+
@@ -71,7 +71,7 @@ module VagrantPlugins
71
71
 
72
72
  def validate(machine)
73
73
  valid_console_types = ['vnc', 'spice']
74
- raise Error::InvalidConsoleType,
74
+ raise Errors::InvalidConsoleType,
75
75
  :console => @console unless valid_console_types.include? @console
76
76
  end
77
77
  end
@@ -7,6 +7,10 @@ module VagrantPlugins
7
7
  error_namespace("vagrant_ovirt3.errors")
8
8
  end
9
9
 
10
+ class InvalidConsoleType < VagrantOVirtError
11
+ error_key(:console_error)
12
+ end
13
+
10
14
  class RsyncError < VagrantOVirtError
11
15
  error_key(:rsync_error)
12
16
  end
@@ -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",
@@ -1,6 +1,6 @@
1
1
  module VagrantPlugins
2
2
  module OVirtProvider
3
- VERSION = '1.3.0'
3
+ VERSION = '1.4.0'
4
4
  end
5
5
  end
6
6
 
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.3.0
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