vagrant-ovirt3 1.6.1 → 1.6.2

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: e8b215d821721e8e16c3b0d6b2d49b405fd7954e
4
- data.tar.gz: 1ecacc58edf43fea7343dfc777bf29809d387c4d
3
+ metadata.gz: d3fa40f4c2d82e0166596e1236ff692ddf8908c3
4
+ data.tar.gz: 9236f514c7f479a39d4d9c32d0c025b3edd5ed80
5
5
  SHA512:
6
- metadata.gz: 1188286222c5274d4120c6b4bb9b7ecf56e82fb433a39a2f56bf45796684881ab77218f105f863000795158dd9597d2f52dc6c779fa50edca9b661e2bf0277f4
7
- data.tar.gz: 7c42be9110cd7cd347e8ab580dd6b064e5d943e11e16575ba4081068fd25a3e135e072f685847c9e28c8e468a841ee403697b99cad24ce899a5a4b716a4cff50
6
+ metadata.gz: 6f954f92eca2c25f35317707bd9dcb13d14dd660473c5f187ab0168c335e51829edc9356e7603c2cb8074f95e8835d1e378eae5e13d033eada8386f229e47876
7
+ data.tar.gz: f67b4d906ceebfcdabb01b6c7fafa57d3d3eeeec7bb26c929cb552f886765feac5adc36b9d406a97d820fa810dde1f509b7bd01a720bde150c128bb18199bd2c
@@ -4,14 +4,14 @@
4
4
  Vagrant.configure("2") do |config|
5
5
  config.vm.box = 'ovirt3'
6
6
  config.vm.box_url = 'https://github.com/myoung34/vagrant-ovirt3/blob/master/example_box/dummy.box?raw=true'
7
- config.vm.hostname = 'asdf'
8
7
 
9
8
  config.vm.provider :ovirt3 do |ovirt|
10
- ovirt.url = "https://server.blindrage.local:443"
11
- ovirt.username = "admin@internal"
12
- ovirt.password = "^4zK>xxTX:HG2s<"
13
- ovirt.datacenter = "local_dc"
14
- ovirt.template = "vagrant-centos65"
9
+ ovirt.url = "https://ovirt.example.com:443"
10
+ ovirt.username = "username"
11
+ ovirt.password = "secret"
12
+ ovirt.datacenter = "Datacenter name"
13
+ ovirt.template = "Template name"
14
+ ovirt.quota = "e92124b9-22f4-4cef-bcd6-b9ae22155dcd"
15
15
  ovirt.cpus = 1
16
16
  ovirt.memory = 512
17
17
  ovirt.ca_no_verify = true
@@ -66,9 +66,15 @@ module VagrantPlugins
66
66
  raise Errors::FogOVirtConnectionError,
67
67
  :error_message => e.message
68
68
  end
69
+
69
70
  OVirtProvider.ovirt_connection = env[:ovirt_compute]
70
71
 
71
- @app.call(env)
72
+ begin
73
+ @app.call(env)
74
+ rescue OVIRT::OvirtException => e
75
+ raise Errors::VMNotFoundError if e.message =~ /^404/
76
+ end
77
+
72
78
  end
73
79
 
74
80
  private
@@ -51,6 +51,10 @@ module VagrantPlugins
51
51
  error_key(:no_vm_error)
52
52
  end
53
53
 
54
+ class VMNotFoundError < VagrantOVirtError
55
+ error_key(:vm_not_found_error)
56
+ end
57
+
54
58
  class StartVMError < VagrantOVirtError
55
59
  error_key(:start_vm_error)
56
60
  end
@@ -1,6 +1,6 @@
1
1
  module VagrantPlugins
2
2
  module OVirtProvider
3
- VERSION = '1.6.1'
3
+ VERSION = '1.6.2'
4
4
  end
5
5
  end
6
6
 
data/locales/en.yml CHANGED
@@ -62,6 +62,8 @@ en:
62
62
  Error while adding new interface to VM. %{error_message}
63
63
  no_vm_error: |-
64
64
  No VM %{vm_name} found.
65
+ vm_not_found_error: |-
66
+ No matching VM found on oVirt server.
65
67
  no_network_error: |-
66
68
  No network %{network_name} found.
67
69
  start_vm_error: |-
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-ovirt3
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.1
4
+ version: 1.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcus Young
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-23 00:00:00.000000000 Z
11
+ date: 2016-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fog