vagrant-ovirt3 1.7.1 → 1.8.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: 85495e61b735d53b7a61d7cf4a91e3e3959d8da6
4
- data.tar.gz: 6725f4fc6ff8232e21b242fd738894fe3e8ae7f9
3
+ metadata.gz: f3e8eb7e6409de51e9157e77ace9f3b4dd2005cf
4
+ data.tar.gz: f3868ef9c66fc67d10a8f3386bf2d5551ef03e6e
5
5
  SHA512:
6
- metadata.gz: 3532c29376e185f950cc5f4bd857f52416420148737189134c9c3bcd56355f5a6f8710fa9b29ff3b4b05ce26bcdba969f76170752f2da242bfcc967c491eaa4a
7
- data.tar.gz: 6a1a0065d9022e37b8e0baa58d8b2450459de390d31ba0baa808b5942b278b156ed53435b7914df27b5932431af9e3dfa4694fe55aec6056312bb386c1bf3376
6
+ metadata.gz: 1a3856cd0d6a6fc709f1ab3dedd0b3584b1c7bd9482fa798422925d270c4326b3fe67cff0da01cf56b44212ddb6c36772b84a64162533a5f6b355fbb66d3a505
7
+ data.tar.gz: 78ddf2cd982cbda1da9cf3ce173ffb9e32437e6ec076b459aea0afee2187287406af8401dd0bcd1dddef05875013d406e966ab991b0890a1f59cf7c8aa07eb47
@@ -17,4 +17,9 @@ Vagrant.configure("2") do |config|
17
17
  ovirt.memory_guaranteed = 1024
18
18
  ovirt.ca_no_verify = true
19
19
  end
20
+ config.vm.provision 'shell' do |shell|
21
+ shell.inline =
22
+ 'sudo yum install -y https://yum.puppetlabs.com/puppetlabs-release-el-6.noarch.rpm >/dev/null 2>&1;' +
23
+ 'sudo yum install -y hiera-1.3.2 puppet-3.5.1;'
24
+ end
20
25
  end
@@ -0,0 +1,18 @@
1
+ module VagrantPlugins
2
+ module OVirtProvider
3
+ module Action
4
+ # This can be used with "Call" built-in to check if the machine
5
+ # is created and branch in the middleware.
6
+ class IsRunning
7
+ def initialize(app, env)
8
+ @app = app
9
+ end
10
+
11
+ def call(env)
12
+ env[:result] = env[:machine].state.id == :up
13
+ @app.call(env)
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -41,6 +41,16 @@ module VagrantPlugins
41
41
  end
42
42
  end
43
43
 
44
+ def self.action_start
45
+ with_ovirt do |env, b|
46
+ if env[:machine_state_id] == :down
47
+ b.use StartVM
48
+ b.use WaitTillUp
49
+ b.use SyncFolders
50
+ end
51
+ end
52
+ end
53
+
44
54
  def self.action_halt
45
55
  with_ovirt do |env, b|
46
56
  if env[:machine_state_id] != :up
@@ -165,9 +175,31 @@ module VagrantPlugins
165
175
  end
166
176
  end
167
177
 
178
+ # This is the action implements the reload command
179
+ # It uses the halt and start actions
180
+ def self.action_reload
181
+ Vagrant::Action::Builder.new.tap do |b|
182
+ b.use Call, IsCreated do |env, b2|
183
+ if !env[:result]
184
+ b2.use MessageNotCreated
185
+ next
186
+ end
187
+ b2.use Call, IsRunning do |env2, b3|
188
+ # if vm is running keep going
189
+ if env2[:result]
190
+ b3.use ConfigValidate
191
+ b3.use action_halt
192
+ b3.use action_start
193
+ end
194
+ end
195
+ end
196
+ end
197
+ end
198
+
168
199
  action_root = Pathname.new(File.expand_path("../action", __FILE__))
169
200
  autoload :ConnectOVirt, action_root.join("connect_ovirt")
170
201
  autoload :IsCreated, action_root.join("is_created")
202
+ autoload :IsRunning, action_root.join("is_running")
171
203
  autoload :SetNameOfDomain, action_root.join("set_name_of_domain")
172
204
  autoload :CreateVM, action_root.join("create_vm")
173
205
  autoload :CreateNetworkInterfaces, action_root.join("create_network_interfaces")
@@ -1,6 +1,6 @@
1
1
  module VagrantPlugins
2
2
  module OVirtProvider
3
- VERSION = '1.7.1'
3
+ VERSION = '1.8.2'
4
4
  end
5
5
  end
6
6
 
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.7.1
4
+ version: 1.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcus Young
@@ -82,6 +82,7 @@ files:
82
82
  - lib/vagrant-ovirt3/action/destroy_vm.rb
83
83
  - lib/vagrant-ovirt3/action/halt_vm.rb
84
84
  - lib/vagrant-ovirt3/action/is_created.rb
85
+ - lib/vagrant-ovirt3/action/is_running.rb
85
86
  - lib/vagrant-ovirt3/action/message_already_created.rb
86
87
  - lib/vagrant-ovirt3/action/message_already_up.rb
87
88
  - lib/vagrant-ovirt3/action/message_not_created.rb