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
@@ -0,0 +1,47 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'vagrant-ovirt4/action/create_vm'
|
3
|
+
require 'vagrant-ovirt4/config'
|
4
|
+
|
5
|
+
describe VagrantPlugins::OVirtProvider::Action::CreateVM do
|
6
|
+
include_context 'provider:action'
|
7
|
+
|
8
|
+
let(:vm) { double('vm', id: 'ID') }
|
9
|
+
|
10
|
+
subject(:action) { described_class.new(app, env) }
|
11
|
+
|
12
|
+
before do
|
13
|
+
allow(env[:ui]).to receive(:info)
|
14
|
+
allow(env[:machine]).to receive(:"id=").with(vm.id)
|
15
|
+
allow(vm_service.get).to receive(:status).and_return('down')
|
16
|
+
end
|
17
|
+
|
18
|
+
context 'given a custom vmname' do
|
19
|
+
let(:vmname) { 'VMNAME' }
|
20
|
+
|
21
|
+
it 'uses that as the name for machine creation' do
|
22
|
+
env[:machine].provider_config.vmname = vmname
|
23
|
+
expect(env[:vms_service]).to receive(:add).with(hash_including(name: vmname)).and_return(vm)
|
24
|
+
action.call(env)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
context 'given no custom vmname' do
|
29
|
+
context 'given a custom hostname' do
|
30
|
+
let(:hostname) { 'HOSTNAME' }
|
31
|
+
|
32
|
+
it 'uses that as the name for machine creation' do
|
33
|
+
expect(env[:machine].config.vm).to receive(:hostname).and_return(hostname)
|
34
|
+
expect(env[:vms_service]).to receive(:add).with(hash_including(name: hostname)).and_return(vm)
|
35
|
+
action.call(env)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
context 'given no custom hostname' do
|
40
|
+
it 'uses a default name for machine creation' do
|
41
|
+
expect(env[:machine].config.vm).to receive(:hostname)
|
42
|
+
expect(env[:vms_service]).to receive(:add).with(hash_including(name: 'vagrant')).and_return(vm)
|
43
|
+
action.call(env)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -17,7 +17,7 @@ describe VagrantPlugins::OVirtProvider::Action::ReadSSHInfo do
|
|
17
17
|
expect(action).to receive(:call).with(env)
|
18
18
|
action.call(env)
|
19
19
|
end
|
20
|
-
|
20
|
+
|
21
21
|
context 'unknown API error' do
|
22
22
|
before do
|
23
23
|
allow(env.machine).to receive(:id).and_return('wat')
|
@@ -25,35 +25,35 @@ describe VagrantPlugins::OVirtProvider::Action::ReadSSHInfo do
|
|
25
25
|
allow(env.vms_service.vm_service).to receive(:get).and_raise('boom')
|
26
26
|
|
27
27
|
end
|
28
|
-
|
29
|
-
it '
|
28
|
+
|
29
|
+
it 'returns nil' do
|
30
30
|
expect(app).to receive(:call).with(env)
|
31
31
|
action.call(env)
|
32
|
-
expect(env.machine_ssh_info).to
|
32
|
+
expect(env.machine_ssh_info).to be_nil
|
33
33
|
end
|
34
|
-
|
35
34
|
end
|
36
35
|
|
37
36
|
context 'machine does not exist' do
|
38
37
|
before do
|
39
38
|
allow(env.machine).to receive(:id).and_return(nil)
|
40
39
|
end
|
41
|
-
|
42
|
-
it '
|
40
|
+
|
41
|
+
it 'returns nil' do
|
43
42
|
expect(app).to receive(:call).with(env)
|
44
43
|
action.call(env)
|
45
|
-
expect(env.machine_ssh_info).to
|
44
|
+
expect(env.machine_ssh_info).to be_nil
|
46
45
|
end
|
47
|
-
|
48
46
|
end
|
49
47
|
|
50
48
|
context 'machine exists' do
|
49
|
+
let(:port) { 44 }
|
50
|
+
|
51
51
|
before do
|
52
52
|
allow(env.machine).to receive(:id).and_return('wat')
|
53
53
|
allow(env.machine).to receive(:config).and_return(OpenStruct.new({
|
54
54
|
ssh: OpenStruct.new({
|
55
|
-
guest_port:
|
56
|
-
})
|
55
|
+
guest_port: port
|
56
|
+
})
|
57
57
|
}))
|
58
58
|
allow(env.vms_service).to receive(:vm_service).and_return({})
|
59
59
|
allow(env.vms_service.vm_service).to receive(:get).and_return({})
|
@@ -61,13 +61,27 @@ describe VagrantPlugins::OVirtProvider::Action::ReadSSHInfo do
|
|
61
61
|
allow(env.vms_service.vm_service.nics_service).to receive(:list).and_return({})
|
62
62
|
allow(env.vms_service.vm_service.get).to receive(:status).and_return('active')
|
63
63
|
end
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
64
|
+
|
65
|
+
context 'with no IP addresses defined' do
|
66
|
+
it 'returns nil' do
|
67
|
+
expect(app).to receive(:call).with(env)
|
68
|
+
action.call(env)
|
69
|
+
expect(env.machine_ssh_info).to be_nil
|
70
|
+
end
|
69
71
|
end
|
70
72
|
|
73
|
+
context 'with at least one IP address defined' do
|
74
|
+
let(:host) { '10.10.10.10' }
|
75
|
+
|
76
|
+
before do
|
77
|
+
allow(action).to receive(:first_active_ipv4_address).and_return(host)
|
78
|
+
end
|
79
|
+
|
80
|
+
it 'returns filled-out SSH information' do
|
81
|
+
expect(app).to receive(:call).with(env)
|
82
|
+
action.call(env)
|
83
|
+
expect(env.machine_ssh_info).to eq(host: host, port: port, username: nil, private_key_path: nil, forward_agent: nil, forward_x11: nil)
|
84
|
+
end
|
85
|
+
end
|
71
86
|
end
|
72
87
|
end
|
73
|
-
|
@@ -0,0 +1,54 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'vagrant-ovirt4/action/start_vm'
|
3
|
+
require 'vagrant-ovirt4/config'
|
4
|
+
|
5
|
+
describe VagrantPlugins::OVirtProvider::Action::StartVM do
|
6
|
+
include_context 'provider:action'
|
7
|
+
|
8
|
+
subject(:action) { described_class.new(app, env) }
|
9
|
+
|
10
|
+
before do
|
11
|
+
allow(env[:ui]).to receive(:info)
|
12
|
+
allow(env[:machine].config.vm).to receive(:hostname)
|
13
|
+
allow(vm_service.get).to receive(:status).and_return('nominal')
|
14
|
+
allow(vm_service).to receive(:start)
|
15
|
+
end
|
16
|
+
|
17
|
+
def vm_initialization_hash_including_hostname(hostname)
|
18
|
+
hash_including(vm: hash_including(initialization: hash_including(host_name: hostname)))
|
19
|
+
end
|
20
|
+
|
21
|
+
context 'given a custom hostname' do
|
22
|
+
let(:hostname) { 'HOSTNAME' }
|
23
|
+
|
24
|
+
it 'uses that as the hostname for machine initialization' do
|
25
|
+
expect(env[:machine].config.vm).to receive(:hostname).and_return(hostname)
|
26
|
+
expect(vm_service).to receive(:start).with(vm_initialization_hash_including_hostname(hostname))
|
27
|
+
action.call(env)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
context 'given no custom hostname' do
|
32
|
+
it 'uses a default value as the hostname for machine initialization' do
|
33
|
+
expect(vm_service).to receive(:start).with(vm_initialization_hash_including_hostname('vagrant'))
|
34
|
+
action.call(env)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
context 'given a custom run_once setting' do
|
39
|
+
[true, false].each do |value|
|
40
|
+
it 'uses that setting' do
|
41
|
+
env[:machine].provider_config.run_once = value
|
42
|
+
expect(vm_service).to receive(:start).with(hash_including(vm: hash_including(run_once: value)))
|
43
|
+
action.call(env)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
context 'given no custom run_once setting' do
|
49
|
+
it 'defaults to false' do
|
50
|
+
expect(vm_service).to receive(:start).with(hash_including(vm: hash_including(run_once: false)))
|
51
|
+
action.call(env)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -40,9 +40,9 @@ describe VagrantPlugins::OVirtProvider::Config do
|
|
40
40
|
its("cluster") { should be_nil }
|
41
41
|
its("console") { should be_nil }
|
42
42
|
its("template") { should be_nil }
|
43
|
-
its("memory_size") { should ==
|
44
|
-
its("memory_maximum") { should ==
|
45
|
-
its("memory_guaranteed") { should ==
|
43
|
+
its("memory_size") { should == 268435456 }
|
44
|
+
its("memory_maximum") { should == 268435456 }
|
45
|
+
its("memory_guaranteed") { should == 268435456 }
|
46
46
|
its("cloud_init") { should be_nil }
|
47
47
|
its("affinity") { should be_nil }
|
48
48
|
its("placement_host") { should be_nil }
|
@@ -50,11 +50,12 @@ describe VagrantPlugins::OVirtProvider::Config do
|
|
50
50
|
its("optimized_for") { should be_nil }
|
51
51
|
its("description") { should == '' }
|
52
52
|
its("comment") { should == '' }
|
53
|
+
its("run_once") { should be false }
|
53
54
|
|
54
55
|
end
|
55
56
|
|
56
57
|
describe "overriding defaults" do
|
57
|
-
[:url, :username, :password, :insecure, :debug, :filtered_api, :cpu_cores, :cpu_sockets, :cpu_threads, :cluster, :console, :template, :cloud_init, :placement_host, :bios_serial, :
|
58
|
+
[:url, :username, :password, :insecure, :debug, :filtered_api, :cpu_cores, :cpu_sockets, :cpu_threads, :cluster, :console, :template, :cloud_init, :placement_host, :bios_serial, :description, :comment].each do |attribute|
|
58
59
|
|
59
60
|
it "should not default #{attribute} if overridden" do
|
60
61
|
instance.send("#{attribute}=".to_sym, "foo")
|
@@ -64,19 +65,40 @@ describe VagrantPlugins::OVirtProvider::Config do
|
|
64
65
|
end
|
65
66
|
end
|
66
67
|
|
68
|
+
describe "overriding optimized_for" do
|
69
|
+
[:optimized_for].each do |attribute|
|
70
|
+
OvirtSDK4::VmType.constants.each do |const|
|
71
|
+
value = const.to_s.downcase
|
72
|
+
|
73
|
+
it "should accept #{value} for #{attribute}" do
|
74
|
+
instance.send("#{attribute}=".to_sym, value)
|
75
|
+
instance.finalize!
|
76
|
+
instance.send(attribute).should == value
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
it "should reject a value for #{attribute} outside of the defined values" do
|
81
|
+
expect {
|
82
|
+
instance.send("#{attribute}=".to_sym, "foo")
|
83
|
+
instance.finalize!
|
84
|
+
}.to raise_error(RuntimeError)
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
67
89
|
describe "overriding memory defaults" do
|
68
90
|
[:memory_size, :memory_maximum, :memory_guaranteed].each do |attribute|
|
69
91
|
|
70
92
|
it "should not default #{attribute} if overridden" do
|
71
|
-
instance.send("#{attribute}=".to_sym, "512
|
93
|
+
instance.send("#{attribute}=".to_sym, "512 MiB")
|
72
94
|
instance.finalize!
|
73
|
-
instance.send(attribute).should ==
|
95
|
+
instance.send(attribute).should == 536870912
|
74
96
|
end
|
75
97
|
|
76
98
|
it "should convert the value" do
|
77
|
-
instance.send("#{attribute}=".to_sym, "1
|
99
|
+
instance.send("#{attribute}=".to_sym, "1 GiB")
|
78
100
|
instance.finalize!
|
79
|
-
instance.send(attribute).should ==
|
101
|
+
instance.send(attribute).should == 1073741824
|
80
102
|
end
|
81
103
|
|
82
104
|
end
|
@@ -84,26 +106,77 @@ describe VagrantPlugins::OVirtProvider::Config do
|
|
84
106
|
|
85
107
|
describe "overriding affinity defaults" do
|
86
108
|
[:affinity].each do |attribute|
|
109
|
+
OvirtSDK4::VmAffinity.constants.each do |const|
|
110
|
+
value = const.to_s.downcase
|
111
|
+
|
112
|
+
it "should accept #{value} for #{attribute}" do
|
113
|
+
instance.send("#{attribute}=".to_sym, value)
|
114
|
+
instance.finalize!
|
115
|
+
instance.send(attribute).should == value
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
it "should reject a value for #{attribute} outside of the defined values" do
|
120
|
+
expect {
|
121
|
+
instance.send("#{attribute}=".to_sym, "foo")
|
122
|
+
instance.finalize!
|
123
|
+
}.to raise_error(RuntimeError)
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
end
|
87
128
|
|
88
|
-
|
89
|
-
|
90
|
-
|
129
|
+
describe "overriding timeout defaults" do
|
130
|
+
[:timeout, :connect_timeout].each do |attribute|
|
131
|
+
[0, 6, 1_000_000, 8.10, nil].each do |value|
|
132
|
+
it "should accept #{value.to_s} for #{attribute}" do
|
133
|
+
instance.send("#{attribute}=".to_sym, value)
|
91
134
|
instance.finalize!
|
92
|
-
|
135
|
+
|
136
|
+
if value.nil?
|
137
|
+
instance.send(attribute).should be_nil
|
138
|
+
else
|
139
|
+
instance.send(attribute).should == Integer(value)
|
140
|
+
end
|
93
141
|
end
|
94
142
|
end
|
95
143
|
|
96
|
-
|
97
|
-
it "should
|
144
|
+
["foo", Object.new, -100].each do |value|
|
145
|
+
it "should reject a value for #{attribute} outside of the defined values" do
|
98
146
|
expect {
|
99
|
-
instance.send("#{attribute}=".to_sym,
|
147
|
+
instance.send("#{attribute}=".to_sym, value)
|
100
148
|
instance.finalize!
|
101
|
-
}.to raise_error
|
102
|
-
|
149
|
+
}.to raise_error { |error|
|
150
|
+
expect(error).to be_a(RuntimeError)
|
151
|
+
expect(error.message).to match(/nonnegative integer/)
|
152
|
+
}
|
103
153
|
end
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
end
|
104
158
|
|
159
|
+
describe "overriding run_once defaults" do
|
160
|
+
context "given truthy values" do
|
161
|
+
[Object.new, {}, true, 1, 0].each do |value|
|
162
|
+
it "should convert #{value.inspect} to 'true'" do
|
163
|
+
instance.run_once = value
|
164
|
+
instance.finalize!
|
165
|
+
expect(instance.run_once).to be true
|
166
|
+
end
|
105
167
|
end
|
168
|
+
end
|
106
169
|
|
170
|
+
context "given falsey values" do
|
171
|
+
[false, nil].each do |value|
|
172
|
+
it "should convert #{value.inspect} to 'false'" do
|
173
|
+
instance.run_once = value
|
174
|
+
instance.finalize!
|
175
|
+
expect(instance.run_once).to be false
|
176
|
+
end
|
177
|
+
end
|
107
178
|
end
|
179
|
+
|
108
180
|
end
|
181
|
+
|
109
182
|
end
|
@@ -0,0 +1,80 @@
|
|
1
|
+
require 'vagrant-ovirt4/util/connection'
|
2
|
+
|
3
|
+
describe VagrantPlugins::OVirtProvider::Util::Connection do
|
4
|
+
class MockConnection
|
5
|
+
def initialize(exception)
|
6
|
+
@closed = false
|
7
|
+
@exception = exception
|
8
|
+
end
|
9
|
+
|
10
|
+
def close
|
11
|
+
raise @exception if @closed
|
12
|
+
@closed = true
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
let(:error_class) { described_class::ERROR_CLASSES.first }
|
17
|
+
let(:exception) { error_class.new('already closed') }
|
18
|
+
let(:conn) { MockConnection.new(exception) }
|
19
|
+
|
20
|
+
describe '#safe_close_connection!' do
|
21
|
+
context 'when called on an open connection' do
|
22
|
+
it 'does not raise an error' do
|
23
|
+
expect { described_class.safe_close_connection!(conn) }.not_to raise_error
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
context 'when called on an already-closed connection' do
|
28
|
+
context 'and the error pertains to double-closing' do
|
29
|
+
it 'yields the error' do
|
30
|
+
expect { described_class.safe_close_connection!(conn) }.not_to raise_error
|
31
|
+
expect { |b| described_class.safe_close_connection!(conn, &b) }.to yield_with_args(exception)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
context 'and the error does not pertain to double-close' do
|
36
|
+
let(:exception) { RuntimeError.new('sorry, no') }
|
37
|
+
|
38
|
+
it 'yields and then raises the error' do
|
39
|
+
expect { described_class.safe_close_connection!(conn) }.not_to raise_error
|
40
|
+
expect { |b| described_class.safe_close_connection!(conn, &b) }.to yield_with_args(exception).and raise_error(exception)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
describe '#safe_connection_connection_standard!' do
|
47
|
+
let(:env) {
|
48
|
+
{
|
49
|
+
connection: conn,
|
50
|
+
ui: double('ui'),
|
51
|
+
}
|
52
|
+
}
|
53
|
+
|
54
|
+
context 'when called on an open connection' do
|
55
|
+
it 'does not raise an error' do
|
56
|
+
expect { described_class.safe_close_connection_standard!(env) }.not_to raise_error
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
context 'when called on an already-closed connection' do
|
61
|
+
context 'and the error pertains to double-closing' do
|
62
|
+
it 'logs a warning' do
|
63
|
+
expect { described_class.safe_close_connection_standard!(env) }.not_to raise_error
|
64
|
+
expect(env[:ui]).to receive(:warn).with(/^Encountered exception of class #{exception.class}: #{exception.message}/)
|
65
|
+
expect { described_class.safe_close_connection_standard!(env) }.not_to raise_error
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
context 'and the error does not pertain to double-close' do
|
70
|
+
let(:exception) { RuntimeError.new('sorry, no') }
|
71
|
+
|
72
|
+
it 'logs a warning and then raises the error' do
|
73
|
+
expect { described_class.safe_close_connection_standard!(env) }.not_to raise_error
|
74
|
+
expect(env[:ui]).to receive(:warn).with(/^Encountered exception of class #{exception.class}: #{exception.message}/)
|
75
|
+
expect { |b| described_class.safe_close_connection_standard!(env) }.to raise_error(exception)
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
data/vagrant-ovirt4.gemspec
CHANGED
@@ -16,7 +16,8 @@ Gem::Specification.new do |gem|
|
|
16
16
|
gem.require_paths = ["lib"]
|
17
17
|
gem.version = VagrantPlugins::OVirtProvider::VERSION
|
18
18
|
|
19
|
-
gem.add_runtime_dependency 'ovirt-engine-sdk', '~> 4
|
19
|
+
gem.add_runtime_dependency 'ovirt-engine-sdk', '~> 4'
|
20
20
|
gem.add_runtime_dependency 'filesize', '~> 0'
|
21
|
+
gem.add_runtime_dependency 'nokogiri', '~> 1'
|
21
22
|
|
22
23
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-ovirt4
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 2.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcus Young
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ovirt-engine-sdk
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 4
|
19
|
+
version: '4'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 4
|
26
|
+
version: '4'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: filesize
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: nokogiri
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1'
|
41
55
|
description: Vagrant provider for oVirt and RHEV v4
|
42
56
|
email:
|
43
57
|
- myoung34@my.apsu.edu
|
@@ -45,16 +59,17 @@ executables: []
|
|
45
59
|
extensions: []
|
46
60
|
extra_rdoc_files: []
|
47
61
|
files:
|
62
|
+
- ".github/FUNDING.yml"
|
48
63
|
- ".gitignore"
|
49
|
-
- ".kitchen.yml"
|
50
64
|
- ".rspec"
|
65
|
+
- CHANGELOG
|
51
66
|
- Dockerfile
|
52
67
|
- Gemfile
|
53
68
|
- Gemfile.lock
|
54
|
-
- Jenkinsfile
|
55
69
|
- LICENSE
|
56
70
|
- README.md
|
57
71
|
- Rakefile
|
72
|
+
- SECURITY.md
|
58
73
|
- example_box/README.md
|
59
74
|
- example_box/Vagrantfile
|
60
75
|
- example_box/dummy.box
|
@@ -85,7 +100,6 @@ files:
|
|
85
100
|
- lib/vagrant-ovirt4/action/snapshot_save.rb
|
86
101
|
- lib/vagrant-ovirt4/action/start_vm.rb
|
87
102
|
- lib/vagrant-ovirt4/action/suspend_vm.rb
|
88
|
-
- lib/vagrant-ovirt4/action/sync_folders.rb
|
89
103
|
- lib/vagrant-ovirt4/action/wait_til_suspended.rb
|
90
104
|
- lib/vagrant-ovirt4/action/wait_till_down.rb
|
91
105
|
- lib/vagrant-ovirt4/action/wait_till_up.rb
|
@@ -97,10 +111,14 @@ files:
|
|
97
111
|
- lib/vagrant-ovirt4/provider.rb
|
98
112
|
- lib/vagrant-ovirt4/util.rb
|
99
113
|
- lib/vagrant-ovirt4/util/collection.rb
|
114
|
+
- lib/vagrant-ovirt4/util/connection.rb
|
115
|
+
- lib/vagrant-ovirt4/util/machine_names.rb
|
100
116
|
- lib/vagrant-ovirt4/util/timer.rb
|
101
117
|
- lib/vagrant-ovirt4/version.rb
|
102
118
|
- locales/en.yml
|
103
119
|
- spec/spec_helper.rb
|
120
|
+
- spec/support/shared_context.rb
|
121
|
+
- spec/vagrant-ovirt4/action/create_vm_spec.rb
|
104
122
|
- spec/vagrant-ovirt4/action/is_created_spec.rb
|
105
123
|
- spec/vagrant-ovirt4/action/is_running_spec.rb
|
106
124
|
- spec/vagrant-ovirt4/action/message_already_up_spec.rb
|
@@ -111,19 +129,17 @@ files:
|
|
111
129
|
- spec/vagrant-ovirt4/action/message_saving_state_spec.rb
|
112
130
|
- spec/vagrant-ovirt4/action/read_ssh_info_spec.rb
|
113
131
|
- spec/vagrant-ovirt4/action/read_state_spec.rb
|
132
|
+
- spec/vagrant-ovirt4/action/start_vm_spec.rb
|
114
133
|
- spec/vagrant-ovirt4/config_spec.rb
|
134
|
+
- spec/vagrant-ovirt4/util/connection_spec.rb
|
115
135
|
- templates/Vagrantfile.erb
|
116
|
-
- test/integration/bios_serial/bios_serial_spec.rb
|
117
|
-
- test/integration/dynamic_network/network_spec.rb
|
118
|
-
- test/integration/optimized_for.sh
|
119
|
-
- test/integration/singleton-static_network/network_spec.rb
|
120
136
|
- tools/prepare_redhat_for_box.sh
|
121
137
|
- vagrant-ovirt4.gemspec
|
122
138
|
homepage: https://github.com/myoung34/vagrant-ovirt4
|
123
139
|
licenses:
|
124
140
|
- MIT
|
125
141
|
metadata: {}
|
126
|
-
post_install_message:
|
142
|
+
post_install_message:
|
127
143
|
rdoc_options: []
|
128
144
|
require_paths:
|
129
145
|
- lib
|
@@ -138,13 +154,15 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
138
154
|
- !ruby/object:Gem::Version
|
139
155
|
version: '0'
|
140
156
|
requirements: []
|
141
|
-
rubygems_version: 3.0.1
|
142
|
-
signing_key:
|
157
|
+
rubygems_version: 3.0.3.1
|
158
|
+
signing_key:
|
143
159
|
specification_version: 4
|
144
160
|
summary: This vagrant plugin provides the ability to create, control, and destroy
|
145
161
|
virtual machines under oVirt/RHEV
|
146
162
|
test_files:
|
147
163
|
- spec/spec_helper.rb
|
164
|
+
- spec/support/shared_context.rb
|
165
|
+
- spec/vagrant-ovirt4/action/create_vm_spec.rb
|
148
166
|
- spec/vagrant-ovirt4/action/is_created_spec.rb
|
149
167
|
- spec/vagrant-ovirt4/action/is_running_spec.rb
|
150
168
|
- spec/vagrant-ovirt4/action/message_already_up_spec.rb
|
@@ -155,8 +173,6 @@ test_files:
|
|
155
173
|
- spec/vagrant-ovirt4/action/message_saving_state_spec.rb
|
156
174
|
- spec/vagrant-ovirt4/action/read_ssh_info_spec.rb
|
157
175
|
- spec/vagrant-ovirt4/action/read_state_spec.rb
|
176
|
+
- spec/vagrant-ovirt4/action/start_vm_spec.rb
|
158
177
|
- spec/vagrant-ovirt4/config_spec.rb
|
159
|
-
-
|
160
|
-
- test/integration/dynamic_network/network_spec.rb
|
161
|
-
- test/integration/optimized_for.sh
|
162
|
-
- test/integration/singleton-static_network/network_spec.rb
|
178
|
+
- spec/vagrant-ovirt4/util/connection_spec.rb
|
data/.kitchen.yml
DELETED
@@ -1,83 +0,0 @@
|
|
1
|
-
driver:
|
2
|
-
name: vagrant
|
3
|
-
vagrantfile_erb: templates/Vagrantfile.erb
|
4
|
-
provider: ovirt4
|
5
|
-
|
6
|
-
verifier:
|
7
|
-
name: inspec
|
8
|
-
format: doc
|
9
|
-
|
10
|
-
platforms:
|
11
|
-
- name: centos7
|
12
|
-
driver_plugin: vagrant
|
13
|
-
driver_config:
|
14
|
-
customize:
|
15
|
-
memory_size: 1024 MB
|
16
|
-
url: <%= ENV['OVIRT_URL'] %>
|
17
|
-
insecure: true
|
18
|
-
username: <%= ENV['OVIRT_USERNAME'] %>
|
19
|
-
password: <%= ENV['OVIRT_PASSWORD'] %>
|
20
|
-
cluster: Default
|
21
|
-
debug: true
|
22
|
-
box: ovirt4
|
23
|
-
box_url: https://github.com/myoung34/vagrant-ovirt4/blob/master/example_box/dummy.box?raw=true
|
24
|
-
|
25
|
-
suites:
|
26
|
-
- name: singleton-static_network
|
27
|
-
driver_config:
|
28
|
-
vm_hostname: static
|
29
|
-
customize:
|
30
|
-
template: vagrant-centos7
|
31
|
-
network:
|
32
|
-
- ["private_network", {ovirt__ip: <%= "192.168.2.254" %>, ovirt__network_name: 'ovirtmgmt', ovirt__gateway: 192.168.2.1, ovirt__netmask: 255.255.255.0, ovirt__dns_servers: 192.168.2.1}]
|
33
|
-
- name: dynamic_network
|
34
|
-
driver_config:
|
35
|
-
vm_hostname: dynamic
|
36
|
-
network:
|
37
|
-
- ["private_network", {ovirt__network_name: 'ovirtmgmt'}]
|
38
|
-
customize:
|
39
|
-
template: vagrant-centos7
|
40
|
-
cloud_init: |
|
41
|
-
runcmd:
|
42
|
-
- ifdown eth0
|
43
|
-
- service network restart
|
44
|
-
- name: bios_serial
|
45
|
-
driver_config:
|
46
|
-
vm_hostname: bios-serial
|
47
|
-
network:
|
48
|
-
- ["private_network", {ovirt__network_name: 'ovirtmgmt'}]
|
49
|
-
customize:
|
50
|
-
template: vagrant-centos7
|
51
|
-
bios_serial: 'banana-hammock'
|
52
|
-
cloud_init: |
|
53
|
-
runcmd:
|
54
|
-
- ifdown eth0
|
55
|
-
- service network restart
|
56
|
-
- name: optimized_for_default
|
57
|
-
verifier:
|
58
|
-
name: shell
|
59
|
-
command: curl --silent -k -L --user "${OVIRT_USERNAME}:${OVIRT_PASSWORD}" --header 'Content-Type: application/xml' --header 'Accept: application/xml' ${OVIRT_URL}/vms/d3f659e1-21ff-42a0-b5fa-7c2f74a36c2b | xmllint --xpath '/vm/type/text()' - | grep desktop
|
60
|
-
driver_config:
|
61
|
-
vm_hostname: optimized-for
|
62
|
-
network:
|
63
|
-
- ["private_network", {ovirt__network_name: 'ovirtmgmt'}]
|
64
|
-
customize:
|
65
|
-
template: vagrant-centos7
|
66
|
-
cloud_init: |
|
67
|
-
runcmd:
|
68
|
-
- ifdown eth0
|
69
|
-
- service network restart
|
70
|
-
- name: optimized_for_set
|
71
|
-
verifier:
|
72
|
-
name: shell
|
73
|
-
command: test/integration/optimized_for.sh
|
74
|
-
driver_config:
|
75
|
-
vm_hostname: optimized-for
|
76
|
-
network:
|
77
|
-
- ["private_network", {ovirt__network_name: 'ovirtmgmt'}]
|
78
|
-
customize:
|
79
|
-
template: vagrant-centos7
|
80
|
-
cloud_init: |
|
81
|
-
runcmd:
|
82
|
-
- ifdown eth0
|
83
|
-
- service network restart
|