vagrant-ovirt3 1.9.1 → 1.9.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: 2f29af2b1bcf8422c9c8d8d4e1ad8eba80ec2520
4
- data.tar.gz: 194dd0976a52eda99b590e6315d98ff71c04d95a
3
+ metadata.gz: 2f4381759317a8261e528eac75a53692f96db524
4
+ data.tar.gz: 0520499d7cb7c254ae47f0e25da3b8340fb2f5d7
5
5
  SHA512:
6
- metadata.gz: 96183c618d0c9d7ed45c978c765472e2675dd8a7c15754a027100f5896583507b2883e73f6d2377b5d269dfa8bf597b24c3846080bf4220c21b3edd4b2c175ec
7
- data.tar.gz: b333a22068d753b8693d846fd82c2a16de88379052a0f9b55ca45014ac2ed6b11191b2c277db07ee0479d9840cc31d16ab70be80d64b3a127a28a02b56eb1471
6
+ metadata.gz: 3770ab823335d22323ca3963f3cbe51843386fad2040ab364231c6a88e1ee3735f5856c4535593697a647fb486bfabae48ce231ad2df73038e73dbf500119834
7
+ data.tar.gz: 659916d19908bab14d4becb247a79095c7cb44b9efe831ae3633de968cec46a98b8f5bc08d040876ec273d5519e88c61061d79cedadb67f161279672eea4f488
@@ -14,6 +14,10 @@ Vagrant.configure("2") do |config|
14
14
  ovirt.template = "vagrant-centos65"
15
15
  ovirt.cpus = 1
16
16
  ovirt.memory = 512
17
- ovirt.ca_no_verify = true
17
+ # ovirt.ca_no_verify = true
18
+ # ovirt.user_data =<<EOF
19
+ #runcmd:
20
+ # - yum install -y java-1.7.0-openjdk
21
+ #EOF
18
22
  end
19
23
  end
@@ -99,7 +99,9 @@ module VagrantPlugins
99
99
  end
100
100
 
101
101
  b2.use ConnectOVirt
102
- b3.use ProvisionerCleanup, :before if defined?(ProvisionerCleanup)
102
+ b2.use ProvisionerCleanup, :before if defined?(ProvisionerCleanup)
103
+ b2.use HaltVM
104
+ b2.use WaitTillDown
103
105
  b2.use DestroyVM
104
106
  end
105
107
  end
@@ -213,6 +215,7 @@ module VagrantPlugins
213
215
  autoload :ReadState, action_root.join("read_state")
214
216
  autoload :ReadSSHInfo, action_root.join("read_ssh_info")
215
217
  autoload :WaitTillUp, action_root.join("wait_till_up")
218
+ autoload :WaitTillDown, action_root.join("wait_till_down")
216
219
  autoload :SyncFolders, action_root.join("sync_folders")
217
220
  autoload :MessageAlreadyCreated, action_root.join("message_already_created")
218
221
  autoload :MessageAlreadyUp, action_root.join("message_already_up")
@@ -117,6 +117,9 @@ module VagrantPlugins
117
117
  break
118
118
  end
119
119
  end
120
+ if env[:machine].state.id != :down
121
+ ready = false
122
+ end
120
123
  break if ready
121
124
  sleep 2
122
125
  end
@@ -0,0 +1,45 @@
1
+ require 'log4r'
2
+ require 'vagrant-ovirt3/util/timer'
3
+ require 'vagrant/util/retryable'
4
+
5
+ module VagrantPlugins
6
+ module OVirtProvider
7
+ module Action
8
+
9
+ # Wait till VM is stopped
10
+ class WaitTillDown
11
+ include Vagrant::Util::Retryable
12
+
13
+ def initialize(app, env)
14
+ @logger = Log4r::Logger.new("vagrant_ovirt3::action::wait_till_down")
15
+ @app = app
16
+ end
17
+
18
+ def call(env)
19
+ config = env[:machine].provider_config
20
+ connect_timeout = config.connect_timeout
21
+
22
+ env[:ui].info(I18n.t("vagrant_ovirt3.wait_till_down"))
23
+ for i in 0..connect_timeout
24
+ ready = true
25
+ server = env[:ovirt_compute].servers.get(env[:machine].id.to_s)
26
+ if env[:machine].state.id != :down
27
+ ready = false
28
+ end
29
+ break if ready
30
+ sleep 2
31
+ end
32
+
33
+ if not ready
34
+ raise Errors::WaitForShutdownVmTimeout
35
+ end
36
+
37
+
38
+ @app.call(env)
39
+ end
40
+
41
+ end
42
+ end
43
+ end
44
+ end
45
+
@@ -63,6 +63,10 @@ module VagrantPlugins
63
63
  error_key(:wait_for_ready_vm_timeout)
64
64
  end
65
65
 
66
+ class WaitForShutdownVmTimeout < VagrantOVirtError
67
+ error_key(:wait_for_shutdown_vm_timeout)
68
+ end
69
+
66
70
  class NoIpAddressError < VagrantOVirtError
67
71
  error_key(:no_ip_address_error)
68
72
  end
@@ -1,6 +1,6 @@
1
1
  module VagrantPlugins
2
2
  module OVirtProvider
3
- VERSION = '1.9.1'
3
+ VERSION = '1.9.2'
4
4
  end
5
5
  end
6
6
 
data/locales/en.yml CHANGED
@@ -16,6 +16,8 @@ en:
16
16
  Halting VM...
17
17
  error_recovering: |-
18
18
  An error occured. Recovering..
19
+ wait_till_down: |-
20
+ Waiting for VM to shutdown...
19
21
  waiting_for_ip: |-
20
22
  Waiting for VM to get an IP address...
21
23
  waiting_for_ssh: |-
@@ -83,6 +85,8 @@ en:
83
85
  Error while updating volume. %{error_message}
84
86
  wait_for_ready_resized_volume_timeout: |-
85
87
  Timeout occurred while waiting for resized volume to become ready
88
+ wait_for_shutdown_vm_timeout: |-
89
+ Timeout occurred while waiting for VM to shutdown
86
90
 
87
91
  states:
88
92
  short_paused: |-
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.9.1
4
+ version: 1.9.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-27 00:00:00.000000000 Z
11
+ date: 2016-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fog
@@ -96,6 +96,7 @@ files:
96
96
  - lib/vagrant-ovirt3/action/start_vm.rb
97
97
  - lib/vagrant-ovirt3/action/suspend_vm.rb
98
98
  - lib/vagrant-ovirt3/action/sync_folders.rb
99
+ - lib/vagrant-ovirt3/action/wait_till_down.rb
99
100
  - lib/vagrant-ovirt3/action/wait_till_up.rb
100
101
  - lib/vagrant-ovirt3/cap/nic_mac_addresses.rb
101
102
  - lib/vagrant-ovirt3/config.rb