vagrant-ovirt4 1.2.3 → 2.1.3
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 +4 -4
- data/.github/FUNDING.yml +3 -0
- data/.gitignore +1 -2
- data/CHANGELOG +50 -0
- data/Gemfile +6 -11
- data/Gemfile.lock +99 -163
- data/README.md +39 -24
- data/Rakefile +3 -16
- data/SECURITY.md +23 -0
- data/lib/vagrant-ovirt4/action/connect_ovirt.rb +29 -7
- data/lib/vagrant-ovirt4/action/create_vm.rb +14 -11
- data/lib/vagrant-ovirt4/action/disconnect_ovirt.rb +4 -1
- data/lib/vagrant-ovirt4/action/halt_vm.rb +11 -0
- data/lib/vagrant-ovirt4/action/read_ssh_info.rb +20 -6
- data/lib/vagrant-ovirt4/action/read_state.rb +7 -1
- data/lib/vagrant-ovirt4/action/snapshot_list.rb +15 -19
- data/lib/vagrant-ovirt4/action/start_vm.rb +13 -4
- data/lib/vagrant-ovirt4/action/wait_till_up.rb +7 -1
- data/lib/vagrant-ovirt4/action.rb +17 -8
- data/lib/vagrant-ovirt4/config.rb +31 -1
- data/lib/vagrant-ovirt4/errors.rb +4 -0
- data/lib/vagrant-ovirt4/util/connection.rb +40 -0
- data/lib/vagrant-ovirt4/util/machine_names.rb +21 -0
- data/lib/vagrant-ovirt4/version.rb +1 -1
- data/lib/vagrant-ovirt4.rb +4 -0
- data/locales/en.yml +6 -0
- data/spec/spec_helper.rb +2 -0
- data/spec/support/shared_context.rb +39 -0
- data/spec/vagrant-ovirt4/action/create_vm_spec.rb +47 -0
- data/spec/vagrant-ovirt4/action/read_ssh_info_spec.rb +31 -17
- data/spec/vagrant-ovirt4/action/start_vm_spec.rb +54 -0
- data/spec/vagrant-ovirt4/config_spec.rb +90 -17
- data/spec/vagrant-ovirt4/util/connection_spec.rb +80 -0
- data/vagrant-ovirt4.gemspec +2 -1
- metadata +35 -19
- data/.kitchen.yml +0 -83
- data/Jenkinsfile +0 -70
- data/lib/vagrant-ovirt4/action/sync_folders.rb +0 -69
- data/test/integration/bios_serial/bios_serial_spec.rb +0 -6
- data/test/integration/dynamic_network/network_spec.rb +0 -6
- data/test/integration/optimized_for.sh +0 -4
- data/test/integration/singleton-static_network/network_spec.rb +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f8d267202b71616a27bf1a4b721fe29264a7128d7643d0059a0558a3a6d76c8
|
4
|
+
data.tar.gz: 4dfc4ee00d4dfef59a9a9acf0e4639bdcd86bf4f030de479e6e0c526eb088441
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 013cbee883c91387751dcb150c4cae7af3e73275845d67f9019e6b508564ad756adc48d8d6d84b721188bd631e006511a58928c3e44b34b0086deac8a50d2d74
|
7
|
+
data.tar.gz: b281f7740fbc84ca12bc8c81a95a6b1ebfeeaa4246c0726384b389a0130716291bf3d859650fcc697a22a7f97a671e114745e403a0b5bb27137b24197e6dc3a5
|
data/.github/FUNDING.yml
ADDED
data/.gitignore
CHANGED
data/CHANGELOG
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
v2.1.2
|
2
|
+
79a0074 Fix lock file
|
3
|
+
|
4
|
+
v2.1.1
|
5
|
+
605663e Bump nokogiri from 1.13.3 to 1.13.4
|
6
|
+
2981f5c Default to disabling run-once mode
|
7
|
+
f048313 Enable oVirt conn debugging when VAGRANT_LOG=info
|
8
|
+
3555e36 Add safe connection closing methods
|
9
|
+
cdb765c Support :timeout and :timeout_connect options
|
10
|
+
tomeon/test-all-vmtype-andvmaffinity-values
|
11
|
+
2a9a653 Rakefile: add RSpec task
|
12
|
+
7641780 test all valid VmType and VmAffinity values
|
13
|
+
54efcde Add tests for vmname and hostname settings
|
14
|
+
dc3ab3e Add "vmname" provider option
|
15
|
+
233e4bb read_ssh_info: return nil on IPv4 lookup failure
|
16
|
+
fcff147 Bump nokogiri from 1.12.5 to 1.13.3
|
17
|
+
da44f24 Bump nokogiri from 1.11.4 to 1.12.5
|
18
|
+
9025f4e Bump nokogiri from 1.11.3 to 1.11.4
|
19
|
+
|
20
|
+
v2.1.0
|
21
|
+
41b8c63 Move where rspec-mocks is included.
|
22
|
+
0015c45 Update engine binding.
|
23
|
+
b2a0015 Not actually using the vagrant-spec thing.
|
24
|
+
a598043 Address the change in parsing.
|
25
|
+
0ad3b72 Get the tests runnable.
|
26
|
+
a8f1d5f Test the connection before passing it on for use.
|
27
|
+
8adf277 list only snapshots for vm's defined in the environment
|
28
|
+
a2ee89b Add security.md
|
29
|
+
3399aab Add CHANGELOG
|
30
|
+
|
31
|
+
v2.0.0
|
32
|
+
|
33
|
+
1810832 Attempt to fix gem push
|
34
|
+
9d1ef6b handle fallback with rescue
|
35
|
+
6cc0f90 fix for backwards compatibility with ovirt 4.3
|
36
|
+
2298314 Make no assumptions on biosdevname/systemd device naming
|
37
|
+
1d870df Support for network interfaces named by biosdevname
|
38
|
+
5c8035a add missing translation
|
39
|
+
f9b6e28 fixed double disconnect due to action_up used in combination wth with_ovirt
|
40
|
+
96f17c0 fixed doule disconnect on reload due to use of with_ovirt
|
41
|
+
697e3d4 fixed inconsistent usages of memory units (MB/MiB and GB/GiB)
|
42
|
+
5a68e8b vagrant destroy only calls halt if vm is up
|
43
|
+
8772ee9 fix for erroneous rsync and state error due to missing ip address
|
44
|
+
5b49114 Bump nokogiri from 1.10.9 to 1.11.0
|
45
|
+
b8314fb fix for waiting indefinitely for an ip when deploying on ovirt 4.4
|
46
|
+
722f2e0 Default to rsync instead of NFS like before
|
47
|
+
2582f53 Use vagrant builtin rsync folder sync
|
48
|
+
84c6c53 In case graceful shutdown failed, fallback to stopping VM immediately
|
49
|
+
640d640 Fix up dependencies
|
50
|
+
029b53b give guests a chance to shutdown gracefully before pulling the plug with a poweroff
|
data/Gemfile
CHANGED
@@ -1,20 +1,15 @@
|
|
1
1
|
source 'http://rubygems.org'
|
2
2
|
|
3
3
|
group :development do
|
4
|
-
gem '
|
4
|
+
gem 'rake'
|
5
|
+
gem 'rspec-core'
|
6
|
+
gem 'rspec-its'
|
7
|
+
gem "rspec-mocks", "~> 3.5"
|
5
8
|
gem 'pry'
|
6
9
|
gem 'byebug'
|
7
10
|
gem 'pry-byebug'
|
8
|
-
|
9
|
-
|
10
|
-
group :testing do
|
11
|
-
gem 'rspec-its'
|
12
|
-
gem 'rspec'
|
13
|
-
gem 'rake'
|
14
|
-
gem 'kitchen-vagrant'
|
15
|
-
gem 'kitchen-inspec'
|
16
|
-
gem 'test-kitchen'
|
17
|
-
gem 'net-scp', "~>1.2"
|
11
|
+
gem 'rake-release'
|
12
|
+
gem "vagrant", git: "https://github.com/hashicorp/vagrant.git"
|
18
13
|
end
|
19
14
|
|
20
15
|
group :plugins do
|
data/Gemfile.lock
CHANGED
@@ -1,211 +1,149 @@
|
|
1
1
|
GIT
|
2
|
-
remote:
|
3
|
-
revision:
|
2
|
+
remote: https://github.com/hashicorp/vagrant.git
|
3
|
+
revision: 22795b161bf67a4c0ebbe32c9ce8777cb888c4a7
|
4
4
|
specs:
|
5
|
-
vagrant (
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
5
|
+
vagrant (2.2.11.dev)
|
6
|
+
bcrypt_pbkdf (~> 1.0.0)
|
7
|
+
childprocess (~> 4.0.0)
|
8
|
+
ed25519 (~> 1.2.4)
|
9
|
+
erubi
|
10
|
+
hashicorp-checkpoint (~> 0.1.5)
|
11
|
+
i18n (~> 1.8)
|
12
|
+
listen (~> 3.1)
|
11
13
|
log4r (~> 1.1.9, < 1.1.11)
|
14
|
+
mime (~> 0.4.4)
|
12
15
|
net-scp (~> 1.2.0)
|
13
|
-
net-sftp (~>
|
14
|
-
net-ssh (~>
|
15
|
-
nokogiri (= 1.6.7.1)
|
16
|
+
net-sftp (~> 3.0)
|
17
|
+
net-ssh (~> 6.0)
|
16
18
|
rb-kqueue (~> 0.2.0)
|
17
19
|
rest-client (>= 1.6.0, < 3.0)
|
18
20
|
ruby_dep (<= 1.3.1)
|
21
|
+
rubyzip (~> 2.0)
|
22
|
+
vagrant_cloud (~> 2.0.3)
|
19
23
|
wdm (~> 0.1.0)
|
20
|
-
winrm (
|
21
|
-
winrm-elevated (
|
22
|
-
winrm-fs (
|
24
|
+
winrm (>= 2.3.4, < 3.0)
|
25
|
+
winrm-elevated (>= 1.2.1, < 2.0)
|
26
|
+
winrm-fs (>= 1.3.4, < 2.0)
|
23
27
|
|
24
28
|
PATH
|
25
29
|
remote: .
|
26
30
|
specs:
|
27
|
-
vagrant-ovirt4 (
|
31
|
+
vagrant-ovirt4 (2.1.3)
|
28
32
|
filesize (~> 0)
|
29
|
-
|
33
|
+
nokogiri (~> 1)
|
34
|
+
ovirt-engine-sdk (~> 4)
|
30
35
|
|
31
36
|
GEM
|
32
37
|
remote: http://rubygems.org/
|
33
38
|
specs:
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
docker-api (1.33.2)
|
43
|
-
excon (>= 0.38.0)
|
44
|
-
json
|
45
|
-
domain_name (0.5.20170223)
|
39
|
+
bcrypt_pbkdf (1.0.1)
|
40
|
+
builder (3.2.4)
|
41
|
+
byebug (11.1.3)
|
42
|
+
childprocess (4.0.0)
|
43
|
+
coderay (1.1.3)
|
44
|
+
concurrent-ruby (1.1.10)
|
45
|
+
diff-lcs (1.5.0)
|
46
|
+
domain_name (0.5.20190701)
|
46
47
|
unf (>= 0.0.5, < 1.0.0)
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
filesize (0.1.1)
|
53
|
-
gssapi (1.2.0)
|
48
|
+
ed25519 (1.2.4)
|
49
|
+
erubi (1.10.0)
|
50
|
+
ffi (1.15.5)
|
51
|
+
filesize (0.2.0)
|
52
|
+
gssapi (1.3.1)
|
54
53
|
ffi (>= 1.0.1)
|
55
|
-
gyoku (1.
|
54
|
+
gyoku (1.4.0)
|
56
55
|
builder (>= 2.1.2)
|
57
|
-
|
58
|
-
|
59
|
-
http-cookie (1.0.
|
56
|
+
rexml (~> 3.0)
|
57
|
+
hashicorp-checkpoint (0.1.5)
|
58
|
+
http-cookie (1.0.4)
|
60
59
|
domain_name (~> 0.5)
|
61
60
|
httpclient (2.8.3)
|
62
|
-
i18n (
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
mixlib-log
|
69
|
-
parallel (~> 1.9)
|
70
|
-
pry (~> 0)
|
71
|
-
rainbow (~> 2)
|
72
|
-
rspec (~> 3)
|
73
|
-
rspec-its (~> 1.2)
|
74
|
-
rspec_junit_formatter (~> 0.2.3)
|
75
|
-
rubyzip (~> 1.1)
|
76
|
-
sslshake (~> 1)
|
77
|
-
thor (~> 0.19)
|
78
|
-
toml (~> 0.1)
|
79
|
-
train (>= 0.22.0, < 1.0)
|
80
|
-
json (2.0.3)
|
81
|
-
kitchen-inspec (0.17.0)
|
82
|
-
hashie (~> 3.4)
|
83
|
-
inspec (>= 0.34.0, < 2.0.0)
|
84
|
-
test-kitchen (~> 1.6)
|
85
|
-
kitchen-vagrant (1.0.2)
|
86
|
-
test-kitchen (~> 1.4)
|
87
|
-
listen (3.1.5)
|
88
|
-
rb-fsevent (~> 0.9, >= 0.9.4)
|
89
|
-
rb-inotify (~> 0.9, >= 0.9.7)
|
90
|
-
ruby_dep (~> 1.2)
|
61
|
+
i18n (1.10.0)
|
62
|
+
concurrent-ruby (~> 1.0)
|
63
|
+
json (2.6.1)
|
64
|
+
listen (3.7.1)
|
65
|
+
rb-fsevent (~> 0.10, >= 0.10.3)
|
66
|
+
rb-inotify (~> 0.9, >= 0.9.10)
|
91
67
|
little-plugger (1.1.4)
|
92
68
|
log4r (1.1.10)
|
93
|
-
logging (2.
|
69
|
+
logging (2.3.0)
|
94
70
|
little-plugger (~> 1.1)
|
95
|
-
multi_json (~> 1.
|
96
|
-
method_source (0.
|
97
|
-
mime
|
71
|
+
multi_json (~> 1.14)
|
72
|
+
method_source (1.0.0)
|
73
|
+
mime (0.4.4)
|
74
|
+
mime-types (3.4.1)
|
98
75
|
mime-types-data (~> 3.2015)
|
99
|
-
mime-types-data (3.
|
100
|
-
|
101
|
-
mixlib-install (2.1.12)
|
102
|
-
artifactory
|
103
|
-
mixlib-shellout
|
104
|
-
mixlib-versioning
|
105
|
-
thor
|
106
|
-
mixlib-log (1.7.1)
|
107
|
-
mixlib-shellout (2.2.7)
|
108
|
-
mixlib-versioning (1.1.0)
|
109
|
-
multi_json (1.12.1)
|
110
|
-
multipart-post (2.0.0)
|
76
|
+
mime-types-data (3.2022.0105)
|
77
|
+
multi_json (1.15.0)
|
111
78
|
net-scp (1.2.1)
|
112
79
|
net-ssh (>= 2.6.5)
|
113
|
-
net-sftp (
|
114
|
-
net-ssh (>=
|
115
|
-
net-ssh (
|
116
|
-
net-ssh-gateway (1.3.0)
|
117
|
-
net-ssh (>= 2.6.5)
|
80
|
+
net-sftp (3.0.0)
|
81
|
+
net-ssh (>= 5.0.0, < 7.0.0)
|
82
|
+
net-ssh (6.1.0)
|
118
83
|
netrc (0.11.0)
|
119
|
-
nokogiri (1.
|
120
|
-
|
84
|
+
nokogiri (1.13.4-x86_64-darwin)
|
85
|
+
racc (~> 1.4)
|
121
86
|
nori (2.6.0)
|
122
|
-
ovirt-engine-sdk (4.
|
123
|
-
json
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
pry (
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
rb-
|
87
|
+
ovirt-engine-sdk (4.4.1)
|
88
|
+
json (>= 1, < 3)
|
89
|
+
pry (0.13.1)
|
90
|
+
coderay (~> 1.1)
|
91
|
+
method_source (~> 1.0)
|
92
|
+
pry-byebug (3.9.0)
|
93
|
+
byebug (~> 11.0)
|
94
|
+
pry (~> 0.13.0)
|
95
|
+
racc (1.6.0)
|
96
|
+
rake (13.0.6)
|
97
|
+
rake-release (1.3.0)
|
98
|
+
bundler (>= 1.11, < 3)
|
99
|
+
rb-fsevent (0.11.1)
|
100
|
+
rb-inotify (0.10.1)
|
101
|
+
ffi (~> 1.0)
|
102
|
+
rb-kqueue (0.2.8)
|
138
103
|
ffi (>= 0.5.0)
|
139
|
-
|
140
|
-
ffi (>= 0.5.0)
|
141
|
-
rest-client (2.0.1)
|
104
|
+
rest-client (2.0.2)
|
142
105
|
http-cookie (>= 1.0.2, < 2.0)
|
143
106
|
mime-types (>= 1.16, < 4.0)
|
144
107
|
netrc (~> 0.8)
|
145
|
-
|
146
|
-
|
147
|
-
rspec-
|
148
|
-
|
149
|
-
rspec-core (3.5.4)
|
150
|
-
rspec-support (~> 3.5.0)
|
151
|
-
rspec-expectations (3.5.0)
|
108
|
+
rexml (3.2.5)
|
109
|
+
rspec-core (3.11.0)
|
110
|
+
rspec-support (~> 3.11.0)
|
111
|
+
rspec-expectations (3.11.0)
|
152
112
|
diff-lcs (>= 1.2.0, < 2.0)
|
153
|
-
rspec-support (~> 3.
|
154
|
-
rspec-its (1.
|
113
|
+
rspec-support (~> 3.11.0)
|
114
|
+
rspec-its (1.3.0)
|
155
115
|
rspec-core (>= 3.0.0)
|
156
116
|
rspec-expectations (>= 3.0.0)
|
157
|
-
rspec-mocks (3.
|
117
|
+
rspec-mocks (3.11.1)
|
158
118
|
diff-lcs (>= 1.2.0, < 2.0)
|
159
|
-
rspec-support (~> 3.
|
160
|
-
rspec-support (3.
|
161
|
-
rspec_junit_formatter (0.2.3)
|
162
|
-
builder (< 4)
|
163
|
-
rspec-core (>= 2, < 4, != 2.12.0)
|
119
|
+
rspec-support (~> 3.11.0)
|
120
|
+
rspec-support (3.11.0)
|
164
121
|
ruby_dep (1.3.1)
|
165
|
-
rubyntlm (0.6.
|
166
|
-
rubyzip (
|
167
|
-
safe_yaml (1.0.4)
|
168
|
-
slop (3.6.0)
|
169
|
-
sslshake (1.0.13)
|
170
|
-
test-kitchen (1.15.0)
|
171
|
-
mixlib-install (>= 1.2, < 3.0)
|
172
|
-
mixlib-shellout (>= 1.2, < 3.0)
|
173
|
-
net-scp (~> 1.1)
|
174
|
-
net-ssh (>= 2.9, < 5.0)
|
175
|
-
net-ssh-gateway (~> 1.2)
|
176
|
-
safe_yaml (~> 1.0)
|
177
|
-
thor (~> 0.18)
|
178
|
-
thor (0.19.4)
|
179
|
-
toml (0.1.2)
|
180
|
-
parslet (~> 1.5.0)
|
181
|
-
train (0.22.1)
|
182
|
-
docker-api (~> 1.26)
|
183
|
-
json (>= 1.8, < 3.0)
|
184
|
-
mixlib-shellout (~> 2.0)
|
185
|
-
net-scp (~> 1.2)
|
186
|
-
net-ssh (>= 2.9, < 5.0)
|
187
|
-
winrm (~> 2.0)
|
188
|
-
winrm-fs (~> 1.0)
|
122
|
+
rubyntlm (0.6.3)
|
123
|
+
rubyzip (2.3.2)
|
189
124
|
unf (0.1.4)
|
190
125
|
unf_ext
|
191
|
-
unf_ext (0.0.
|
126
|
+
unf_ext (0.0.8.1)
|
127
|
+
vagrant_cloud (2.0.3)
|
128
|
+
rest-client (~> 2.0.2)
|
192
129
|
wdm (0.1.1)
|
193
|
-
winrm (2.
|
130
|
+
winrm (2.3.6)
|
194
131
|
builder (>= 2.1.2)
|
195
|
-
|
132
|
+
erubi (~> 1.8)
|
196
133
|
gssapi (~> 1.2)
|
197
134
|
gyoku (~> 1.0)
|
198
135
|
httpclient (~> 2.2, >= 2.2.0.2)
|
199
136
|
logging (>= 1.6.1, < 3.0)
|
200
137
|
nori (~> 2.0)
|
201
|
-
rubyntlm (~> 0.6.0, >= 0.6.
|
202
|
-
winrm-elevated (1.
|
138
|
+
rubyntlm (~> 0.6.0, >= 0.6.3)
|
139
|
+
winrm-elevated (1.2.3)
|
140
|
+
erubi (~> 1.8)
|
203
141
|
winrm (~> 2.0)
|
204
142
|
winrm-fs (~> 1.0)
|
205
|
-
winrm-fs (1.
|
206
|
-
|
143
|
+
winrm-fs (1.3.5)
|
144
|
+
erubi (~> 1.8)
|
207
145
|
logging (>= 1.6.1, < 3.0)
|
208
|
-
rubyzip (~>
|
146
|
+
rubyzip (~> 2.0)
|
209
147
|
winrm (~> 2.0)
|
210
148
|
|
211
149
|
PLATFORMS
|
@@ -213,17 +151,15 @@ PLATFORMS
|
|
213
151
|
|
214
152
|
DEPENDENCIES
|
215
153
|
byebug
|
216
|
-
kitchen-inspec
|
217
|
-
kitchen-vagrant
|
218
|
-
net-scp (~> 1.2)
|
219
154
|
pry
|
220
155
|
pry-byebug
|
221
156
|
rake
|
222
|
-
|
157
|
+
rake-release
|
158
|
+
rspec-core
|
223
159
|
rspec-its
|
224
|
-
|
160
|
+
rspec-mocks (~> 3.5)
|
225
161
|
vagrant!
|
226
162
|
vagrant-ovirt4!
|
227
163
|
|
228
164
|
BUNDLED WITH
|
229
|
-
1.
|
165
|
+
1.17.2
|
data/README.md
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
[OvirtSDK4::Connection#initialize]: https://rubydoc.info/gems/ovirt-engine-sdk/OvirtSDK4%2FConnection:initialize
|
2
|
+
|
1
3
|
# Vagrant oVirt v4 Provider
|
2
4
|
|
3
5
|
This is a [Vagrant](http://www.vagrantup.com) 1.1+ plugin that adds an
|
@@ -63,6 +65,12 @@ Vagrant.configure("2") do |config|
|
|
63
65
|
:ovirt__network_name => 'ovirtmgmt' #DHCP
|
64
66
|
# Static configuration
|
65
67
|
#:ovirt__ip => '192.168.2.198', :ovirt__network_name => 'ovirtmgmt', :ovirt__gateway => '192.168.2.125', :ovirt__netmask => '255.255.0.0', :ovirt__dns_servers => '192.168.2.1', :ovirt__dns_search => 'test.local'
|
68
|
+
# Static configuration with biosdevname. Guest OS assigns interface names (ens3, em1 or something else). ovirt__interface_name has to match that name.
|
69
|
+
#:ovirt__ip => '192.168.2.198', :ovirt__network_name => 'ovirtmgmt', :ovirt__gateway => '192.168.2.125', :ovirt__netmask => '255.255.0.0', :ovirt__dns_servers => '192.168.2.1', :ovirt__dns_search => 'test.local', :ovirt__interface_name => 'ens3'
|
70
|
+
|
71
|
+
# configure additional interface
|
72
|
+
# config.vm.network :private_network,
|
73
|
+
# :ovirt__ip => '192.168.2.199', :ovirt__network_name => 'ovirtmgmt', :ovirt__netmask => '255.255.0.0', :ovirt__interface_name => 'ens4'
|
66
74
|
|
67
75
|
config.vm.provider :ovirt4 do |ovirt|
|
68
76
|
ovirt.url = 'https://server/ovirt-engine/api'
|
@@ -70,13 +78,17 @@ Vagrant.configure("2") do |config|
|
|
70
78
|
ovirt.password = "password"
|
71
79
|
ovirt.insecure = true
|
72
80
|
ovirt.debug = true
|
81
|
+
ovirt.timeout = 120 # seconds
|
82
|
+
ovirt.connect_timeout = 30 # seconds
|
73
83
|
ovirt.filtered_api = true #see http://www.ovirt.org/develop/release-management/features/infra/user-portal-permissions/
|
74
84
|
ovirt.cluster = 'Default'
|
85
|
+
ovirt.vmname = 'my-vm'
|
86
|
+
ovirt.run_once = false
|
75
87
|
ovirt.template = 'Vagrant-Centos7-test'
|
76
88
|
ovirt.console = 'vnc'
|
77
|
-
ovirt.disk_size = '15
|
89
|
+
ovirt.disk_size = '15 GiB' # only growing is supported. works the same way as below memory settings
|
78
90
|
ovirt.memory_size = '1 GiB' #see https://github.com/dominikh/filesize for usage
|
79
|
-
ovirt.memory_guaranteed = '256
|
91
|
+
ovirt.memory_guaranteed = '256 MiB' #see https://github.com/dominikh/filesize for usage
|
80
92
|
ovirt.cpu_cores = 2
|
81
93
|
ovirt.cpu_sockets = 2
|
82
94
|
ovirt.cpu_threads = 2
|
@@ -99,8 +111,8 @@ end
|
|
99
111
|
### Configuration options
|
100
112
|
|
101
113
|
1. Vagrant specific
|
102
|
-
1. `config.vm.hostname` => Sets the hostname of the VM
|
103
|
-
|
114
|
+
1. `config.vm.hostname` => Sets the hostname of the VM. Optional. String.
|
115
|
+
Default is `"vagrant"`.
|
104
116
|
a. Is the 'hostname' of the VM configured by `cloud-init`
|
105
117
|
1. `config.vm.network` => Sets the network information of the VM.
|
106
118
|
a. Note: `:ip` => is ignored, but `:ovirt__ip` is used and merged with `:ip`
|
@@ -112,7 +124,22 @@ end
|
|
112
124
|
1. `username` => The username for the API. Required. String. No default value.
|
113
125
|
1. `password` => The password for the API. Required. String. No default value.
|
114
126
|
1. `insecure` => Allow connecting to SSL sites without certificates. Optional. Bool. Default is `false`
|
115
|
-
1. `debug` => Turn on additional log statements. Optional. Bool. Default is
|
127
|
+
1. `debug` => Turn on additional log statements. Optional. Bool. Default is
|
128
|
+
`true` if Vagrant's logging verbosity is set to `info` or above
|
129
|
+
(`VAGRANT_LOG={info,debug,...}`); otherwise, the default is `false`.
|
130
|
+
1. `timeout` => Per [the oVirt SDK docs][OvirtSDK4::Connection#initialize],
|
131
|
+
"The maximun (_sic_) total time to wait for the response, in seconds. A value of
|
132
|
+
zero (the default) means wait for ever." Optional. Integer. Uses the
|
133
|
+
`OvirtSDK4::Connection` default if omitted; as of the time of writing,
|
134
|
+
this is `0` (i.e. wait forever).
|
135
|
+
1. `connect_timeout` => Per [the oVirt SDK docs][OvirtSDK4::Connection#initialize],
|
136
|
+
"The maximun (_sic_) time to wait for connection establishment, in
|
137
|
+
seconds." Optional. Integer. Uses the `OvirtSDK4::Connection` default if
|
138
|
+
omitted; as of the time of writing, this is `300`.
|
139
|
+
1. `vmname` => Sets the name of the VM. Optional. String. Default is
|
140
|
+
`config.vm.hostname`, if defined, otherwise `"vagrant"`.
|
141
|
+
a. Is the 'name' in the Virtual Machine tab of the UI
|
142
|
+
1. `run_once` => Launch VM in run-once mode. Optional. Default is `false`.
|
116
143
|
1. `template` => The name of the template to use for creation. Required. String. No Default value.
|
117
144
|
1. `cluster` => The name of the ovirt cluster to create within. Required. String. No Default value.
|
118
145
|
1. `console` => The type of remote viewing protocol to use. Required. String. No Default value.
|
@@ -132,25 +159,6 @@ end
|
|
132
159
|
a. `storage_domain`: the storage domain where the disk should be created
|
133
160
|
|
134
161
|
|
135
|
-
## Testing
|
136
|
-
|
137
|
-
Currently pull-requests are tested via [test-kitchen using kitchen-vagrant](https://github.com/test-kitchen/kitchen-vagrant).
|
138
|
-
See [Jenkinsfile](Jenkinsfile) for more information.
|
139
|
-
If you'd like to run them yourself, however, they make not work in all setups. For example they assume `192.168.2.0/24`, host pinning will probably not have a host that's in all set ups, and the template names might not match.
|
140
|
-
|
141
|
-
To run Unit tests: `bundle install; bundle exec rspec`
|
142
|
-
|
143
|
-
To run acceptance tests:
|
144
|
-
|
145
|
-
```bash
|
146
|
-
export OVIRT_URL='https://yoururl/ovirt-engine/api''
|
147
|
-
export OVIRT_USERNAME='yourname@internal'
|
148
|
-
export OVIRT_PASSWORD='yourpassword!'
|
149
|
-
gem build *.gemspec
|
150
|
-
vagrant plugin install *.gem
|
151
|
-
bundle exec kitchen test all
|
152
|
-
```
|
153
|
-
|
154
162
|
## Contributing
|
155
163
|
|
156
164
|
1. Fork it
|
@@ -158,3 +166,10 @@ bundle exec kitchen test all
|
|
158
166
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
159
167
|
4. Push to the branch (`git push origin my-new-feature`)
|
160
168
|
5. Create new Pull Request
|
169
|
+
|
170
|
+
Some pointers:
|
171
|
+
|
172
|
+
* To install the requirements when developing:
|
173
|
+
* `bundle install`
|
174
|
+
* To run the test suite:
|
175
|
+
* `bundle exec rspec spec/`
|
data/Rakefile
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'bundler/setup'
|
3
|
+
require 'rake/release'
|
3
4
|
require 'rspec/core/rake_task'
|
4
|
-
require 'kitchen/rake_tasks'
|
5
5
|
|
6
6
|
# Immediately sync all stdout so that tools like buildbot can
|
7
7
|
# immediately load in the output.
|
@@ -15,19 +15,6 @@ Dir.chdir(File.expand_path("../", __FILE__))
|
|
15
15
|
# publishing.
|
16
16
|
Bundler::GemHelper.install_tasks
|
17
17
|
|
18
|
-
|
19
|
-
RSpec::Core::RakeTask.new(:spec) do |t|
|
20
|
-
t.rspec_opts = "--order defined"
|
21
|
-
end
|
18
|
+
RSpec::Core::RakeTask.new
|
22
19
|
|
23
|
-
|
24
|
-
namespace :test do
|
25
|
-
task :all do
|
26
|
-
RSpec::Core::RakeTask.new(:spec)
|
27
|
-
Rake::Task["spec"].execute
|
28
|
-
Kitchen::RakeTasks.new
|
29
|
-
Rake::Task['kitchen:all'].invoke
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
task :default => 'test:all'
|
20
|
+
task :default => [:spec]
|
data/SECURITY.md
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
## Security
|
2
|
+
|
3
|
+
If you believe you have found a security vulnerability, please report it to me as described below.
|
4
|
+
|
5
|
+
## Reporting Security Issues
|
6
|
+
|
7
|
+
**Please do not report security vulnerabilities through public GitHub issues.** Instead, please report them to me directly at [myoung34@my.apsu.edu](mailto:myoung34@my.apsu.edu).
|
8
|
+
|
9
|
+
If you'd like to communicate securely, my keybase is [here](https://keybase.io/3vilpenguin)
|
10
|
+
|
11
|
+
Please include the requested information listed below (as much as you can provide) to help better understand the nature and scope of the possible issue:
|
12
|
+
|
13
|
+
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
|
14
|
+
* Full paths of source file(s) related to the manifestation of the issue
|
15
|
+
* The location of the affected source code (tag/branch/commit or direct URL)
|
16
|
+
* Any special configuration required to reproduce the issue
|
17
|
+
* Step-by-step instructions to reproduce the issue
|
18
|
+
* Proof-of-concept or exploit code (if possible)
|
19
|
+
* Impact of the issue, including how an attacker might exploit the issue
|
20
|
+
|
21
|
+
## Preferred Languages
|
22
|
+
|
23
|
+
I prefer all communications to be in English.
|
@@ -19,17 +19,39 @@ module VagrantPlugins
|
|
19
19
|
conn_attr[:url] = "#{config.url}"
|
20
20
|
conn_attr[:username] = config.username if config.username
|
21
21
|
conn_attr[:password] = config.password if config.password
|
22
|
-
conn_attr[:debug] = config.debug if config.debug
|
23
22
|
conn_attr[:insecure] = true if config.insecure
|
24
23
|
conn_attr[:headers] = {'Filter' => true} if config.filtered_api
|
24
|
+
conn_attr[:timeout] = config.timeout unless config.timeout.nil?
|
25
|
+
conn_attr[:connect_timeout] = config.connect_timeout unless config.connect_timeout.nil?
|
25
26
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
27
|
+
# Respect VAGRANT_LOG setting -- any level at least as verbose as
|
28
|
+
# "info" will result in logging oVirt connection debugging messages
|
29
|
+
# (read: libcurl verbose output).
|
30
|
+
conn_attr[:debug] = config.debug or @logger.info?
|
31
|
+
|
32
|
+
# Inject our own logger so that messages are namespaced under
|
33
|
+
# "connect_ovirt"
|
34
|
+
conn_attr[:log] = @logger
|
31
35
|
|
32
|
-
@
|
36
|
+
@logger.info("Connecting to oVirt (#{config.url}) ...")
|
37
|
+
ovirt_connection = OvirtSDK4::Connection.new(conn_attr)
|
38
|
+
vms_service = ovirt_connection.system_service.vms_service
|
39
|
+
|
40
|
+
# XXX: Continue setting deprecated global properties. Use of the
|
41
|
+
# related values from env should be preferred.
|
42
|
+
OVirtProvider.ovirt_connection = ovirt_connection
|
43
|
+
OVirtProvider.vms_service = vms_service
|
44
|
+
|
45
|
+
begin
|
46
|
+
ovirt_connection.test(true, 30)
|
47
|
+
rescue => error
|
48
|
+
raise Errors::ServiceConnectionError,
|
49
|
+
:error_message => error.message
|
50
|
+
else
|
51
|
+
env[:connection] = ovirt_connection
|
52
|
+
env[:vms_service] = vms_service
|
53
|
+
@app.call(env)
|
54
|
+
end
|
33
55
|
end
|
34
56
|
|
35
57
|
end
|