vagrant-ovirt3 1.8.2 → 1.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/example_box/Vagrantfile +0 -6
- data/lib/vagrant-ovirt3/action/create_vm.rb +2 -1
- data/lib/vagrant-ovirt3/action/resize_disk.rb +2 -1
- data/lib/vagrant-ovirt3/action.rb +2 -1
- data/lib/vagrant-ovirt3/config.rb +11 -6
- data/lib/vagrant-ovirt3/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 666e8643bf765fcc152b93eeeb015051baa4ee61
|
4
|
+
data.tar.gz: 9d011d9260303de3cd9830234f0725a43aeabbd4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51548dd0f3632d86c1e5eff7a7867edda8d4a725c6d99ef9d18ea37bfeee1d1388b97c08a7b308910572bcde809307a4059af5196aeb027a428b64b7136291b2
|
7
|
+
data.tar.gz: dfcbdac34197c3ed681a6a217e25b680e61a49151ab6136a0c88db0ee2b2a2a769b5bb99fbbac516fd937d671226331600a25e6c8cd7bb2aa5ba4c732f5711ec
|
data/README.md
CHANGED
@@ -44,6 +44,7 @@ Vagrant.configure('2') do |config|
|
|
44
44
|
ovirt.quota = "e92124b9-22f4-4cef-bcd6-b9ae22155dcd"
|
45
45
|
ovirt.ca_no_verify = true
|
46
46
|
ovirt.memory_guaranteed = 2048 # Supported by oVirt 3.6 and above only
|
47
|
+
ovirt.connect_timeout = 30
|
47
48
|
end
|
48
49
|
end
|
49
50
|
```
|
@@ -65,6 +66,7 @@ This provider exposes quite a few provider-specific configuration options:
|
|
65
66
|
certificate.
|
66
67
|
* `quota` - The ID of the quota to use. This can be retrieved via the REST API
|
67
68
|
* `memory_guaranteed` - The amount of memory guaranteed to the VM. *Supported by oVirt 3.6 and above only*
|
69
|
+
* `connect_timeout` - The amount of time to wait until the VM changes state
|
68
70
|
|
69
71
|
### Domain Specific Options
|
70
72
|
|
data/example_box/Vagrantfile
CHANGED
@@ -14,12 +14,6 @@ Vagrant.configure("2") do |config|
|
|
14
14
|
ovirt.template = "vagrant-centos65"
|
15
15
|
ovirt.cpus = 1
|
16
16
|
ovirt.memory = 512
|
17
|
-
ovirt.memory_guaranteed = 1024
|
18
17
|
ovirt.ca_no_verify = true
|
19
18
|
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
|
25
19
|
end
|
@@ -23,6 +23,7 @@ module VagrantPlugins
|
|
23
23
|
memory_guaranteed_size = config.memory_guaranteed ? config.memory_guaranteed*1024 : nil
|
24
24
|
quota = config.quota
|
25
25
|
memory_size = config.memory*1024
|
26
|
+
connect_timeout = config.connect_timeout
|
26
27
|
user_data = config.user_data ?
|
27
28
|
Base64::encode64(config.user_data) :
|
28
29
|
nil
|
@@ -107,7 +108,7 @@ module VagrantPlugins
|
|
107
108
|
|
108
109
|
# Wait till all volumes are ready.
|
109
110
|
env[:ui].info(I18n.t("vagrant_ovirt3.wait_for_ready_vm"))
|
110
|
-
for i in 0..
|
111
|
+
for i in 0..connect_timeout
|
111
112
|
ready = true
|
112
113
|
server = env[:ovirt_compute].servers.get(env[:machine].id.to_s)
|
113
114
|
server.volumes.each do |volume|
|
@@ -16,6 +16,7 @@ module VagrantPlugins
|
|
16
16
|
def call(env)
|
17
17
|
# Is it necessary to resize the disk?
|
18
18
|
config = env[:machine].provider_config
|
19
|
+
connect_timeout = config.connect_timeout
|
19
20
|
if config.disk_size.nil?
|
20
21
|
# Nothing to do
|
21
22
|
@app.call(env)
|
@@ -44,7 +45,7 @@ module VagrantPlugins
|
|
44
45
|
|
45
46
|
# Wait till all volumes are ready.
|
46
47
|
env[:ui].info(I18n.t("vagrant_ovirt3.wait_for_ready_volume"))
|
47
|
-
for i in 0..
|
48
|
+
for i in 0..connect_timeout
|
48
49
|
ready = true
|
49
50
|
machine = env[:ovirt_compute].servers.get(env[:machine].id.to_s)
|
50
51
|
machine.volumes.each do |volume|
|
@@ -147,7 +147,8 @@ module VagrantPlugins
|
|
147
147
|
def self.action_ssh_run
|
148
148
|
Vagrant::Action::Builder.new.tap do |b|
|
149
149
|
b.use ConfigValidate
|
150
|
-
b.use
|
150
|
+
b.use ConnectOVirt
|
151
|
+
b.use Call, ReadState do |env, b2|
|
151
152
|
if env[:machine_state_id] == :not_created
|
152
153
|
b2.use MessageNotCreated
|
153
154
|
next
|
@@ -11,6 +11,8 @@ module VagrantPlugins
|
|
11
11
|
attr_accessor :cluster
|
12
12
|
attr_accessor :filtered_api
|
13
13
|
|
14
|
+
attr_accessor :connect_timeout
|
15
|
+
|
14
16
|
# Domain specific settings used while creating new machine.
|
15
17
|
attr_accessor :memory
|
16
18
|
attr_accessor :memory_guaranteed
|
@@ -29,12 +31,14 @@ module VagrantPlugins
|
|
29
31
|
attr_accessor :ca_cert_file
|
30
32
|
|
31
33
|
def initialize
|
32
|
-
@url
|
33
|
-
@username
|
34
|
-
@password
|
35
|
-
@datacenter
|
36
|
-
@cluster
|
37
|
-
@filtered_api
|
34
|
+
@url = UNSET_VALUE
|
35
|
+
@username = UNSET_VALUE
|
36
|
+
@password = UNSET_VALUE
|
37
|
+
@datacenter = UNSET_VALUE
|
38
|
+
@cluster = UNSET_VALUE
|
39
|
+
@filtered_api = UNSET_VALUE
|
40
|
+
|
41
|
+
@connect_timeout = UNSET_VALUE
|
38
42
|
|
39
43
|
# Domain specific settings.
|
40
44
|
@memory = UNSET_VALUE
|
@@ -60,6 +64,7 @@ module VagrantPlugins
|
|
60
64
|
@datacenter = nil if @datacenter == UNSET_VALUE
|
61
65
|
@cluster = nil if @cluster == UNSET_VALUE
|
62
66
|
@filtered_api = false if @filtered_api == UNSET_VALUE
|
67
|
+
@connect_timeout = 10 if @connect_timeout == UNSET_VALUE
|
63
68
|
|
64
69
|
# Domain specific settings.
|
65
70
|
@memory = 512 if @memory == UNSET_VALUE
|