vagrant-libvirt 0.0.36 → 0.0.37
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/.coveralls.yml +1 -0
- data/Gemfile +1 -0
- data/README.md +171 -13
- data/lib/vagrant-libvirt/action/create_domain.rb +44 -19
- data/lib/vagrant-libvirt/action/create_domain_volume.rb +12 -12
- data/lib/vagrant-libvirt/action/create_network_interfaces.rb +37 -39
- data/lib/vagrant-libvirt/action/create_networks.rb +34 -34
- data/lib/vagrant-libvirt/action/destroy_domain.rb +7 -8
- data/lib/vagrant-libvirt/action/destroy_networks.rb +12 -13
- data/lib/vagrant-libvirt/action/forward_ports.rb +21 -23
- data/lib/vagrant-libvirt/action/halt_domain.rb +8 -9
- data/lib/vagrant-libvirt/action/handle_box_image.rb +28 -27
- data/lib/vagrant-libvirt/action/handle_storage_pool.rb +8 -8
- data/lib/vagrant-libvirt/action/is_created.rb +1 -1
- data/lib/vagrant-libvirt/action/is_running.rb +2 -2
- data/lib/vagrant-libvirt/action/is_suspended.rb +4 -4
- data/lib/vagrant-libvirt/action/message_already_created.rb +2 -2
- data/lib/vagrant-libvirt/action/message_not_created.rb +2 -2
- data/lib/vagrant-libvirt/action/message_not_running.rb +2 -2
- data/lib/vagrant-libvirt/action/message_not_suspended.rb +2 -2
- data/lib/vagrant-libvirt/action/package_domain.rb +6 -5
- data/lib/vagrant-libvirt/action/prepare_nfs_settings.rb +7 -6
- data/lib/vagrant-libvirt/action/prepare_nfs_valid_ids.rb +2 -2
- data/lib/vagrant-libvirt/action/prune_nfs_exports.rb +3 -3
- data/lib/vagrant-libvirt/action/read_mac_addresses.rb +8 -10
- data/lib/vagrant-libvirt/action/remove_libvirt_image.rb +4 -4
- data/lib/vagrant-libvirt/action/remove_stale_volume.rb +8 -7
- data/lib/vagrant-libvirt/action/resume_domain.rb +5 -5
- data/lib/vagrant-libvirt/action/set_boot_order.rb +70 -27
- data/lib/vagrant-libvirt/action/set_name_of_domain.rb +10 -12
- data/lib/vagrant-libvirt/action/share_folders.rb +16 -18
- data/lib/vagrant-libvirt/action/start_domain.rb +59 -64
- data/lib/vagrant-libvirt/action/suspend_domain.rb +5 -5
- data/lib/vagrant-libvirt/action/wait_till_up.rb +24 -26
- data/lib/vagrant-libvirt/action.rb +18 -23
- data/lib/vagrant-libvirt/cap/mount_p9.rb +11 -10
- data/lib/vagrant-libvirt/cap/nic_mac_addresses.rb +1 -1
- data/lib/vagrant-libvirt/cap/synced_folder.rb +20 -19
- data/lib/vagrant-libvirt/config.rb +164 -136
- data/lib/vagrant-libvirt/driver.rb +10 -13
- data/lib/vagrant-libvirt/errors.rb +4 -3
- data/lib/vagrant-libvirt/plugin.rb +4 -6
- data/lib/vagrant-libvirt/provider.rb +23 -24
- data/lib/vagrant-libvirt/templates/domain.xml.erb +14 -1
- data/lib/vagrant-libvirt/templates/private_network.xml.erb +4 -0
- data/lib/vagrant-libvirt/util/collection.rb +0 -3
- data/lib/vagrant-libvirt/util/erb_template.rb +6 -10
- data/lib/vagrant-libvirt/util/error_codes.rb +32 -33
- data/lib/vagrant-libvirt/util/network_util.rb +29 -21
- data/lib/vagrant-libvirt/util.rb +3 -4
- data/lib/vagrant-libvirt/version.rb +1 -1
- data/locales/en.yml +3 -0
- data/spec/spec_helper.rb +3 -0
- data/spec/support/environment_helper.rb +5 -7
- data/spec/support/libvirt_context.rb +13 -11
- data/spec/support/sharedcontext.rb +9 -10
- data/spec/unit/action/destroy_domain_spec.rb +38 -37
- data/spec/unit/action/set_name_of_domain_spec.rb +4 -4
- data/spec/unit/action/wait_till_up_spec.rb +45 -46
- data/spec/unit/config_spec.rb +106 -0
- data/spec/unit/templates/domain_all_settings.xml +125 -0
- data/spec/unit/templates/domain_defaults.xml +44 -0
- data/spec/unit/templates/domain_spec.rb +69 -0
- data/tools/create_box.sh +8 -2
- metadata +12 -3
data/tools/create_box.sh
CHANGED
@@ -8,7 +8,7 @@ error() {
|
|
8
8
|
}
|
9
9
|
|
10
10
|
usage() {
|
11
|
-
echo "Usage: ${0} IMAGE [BOX]"
|
11
|
+
echo "Usage: ${0} IMAGE [BOX] [Vagrantfile.add]"
|
12
12
|
echo
|
13
13
|
echo "Package a qcow2 image into a vagrant-libvirt reusable box"
|
14
14
|
}
|
@@ -32,7 +32,7 @@ isabspath(){
|
|
32
32
|
[[ "$path" =~ ^/.* ]]
|
33
33
|
}
|
34
34
|
|
35
|
-
if [ -z "$1" ]; then
|
35
|
+
if [ -z "$1" ] || [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
|
36
36
|
usage
|
37
37
|
exit 1
|
38
38
|
fi
|
@@ -62,6 +62,10 @@ mkdir -p "$TMP_DIR"
|
|
62
62
|
|
63
63
|
[[ ! -r "$IMG" ]] && error "'$IMG': Permission denied"
|
64
64
|
|
65
|
+
if [ -n "$3" ] && [ -r "$3" ]; then
|
66
|
+
VAGRANTFILE_ADD="$(cat $3)"
|
67
|
+
fi
|
68
|
+
|
65
69
|
# We move / copy (when the image has master) the image to the tempdir
|
66
70
|
# ensure that it's moved back / removed again
|
67
71
|
if [[ -n $(backing "$IMG") ]]; then
|
@@ -107,6 +111,8 @@ Vagrant.configure("2") do |config|
|
|
107
111
|
libvirt.storage_pool_name = "default"
|
108
112
|
|
109
113
|
end
|
114
|
+
|
115
|
+
${VAGRANTFILE_ADD:-}
|
110
116
|
end
|
111
117
|
EOF
|
112
118
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-libvirt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.37
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lukas Stanek
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2017-01-09 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rspec-core
|
@@ -105,6 +105,7 @@ executables: []
|
|
105
105
|
extensions: []
|
106
106
|
extra_rdoc_files: []
|
107
107
|
files:
|
108
|
+
- ".coveralls.yml"
|
108
109
|
- ".github/issue_template.md"
|
109
110
|
- ".gitignore"
|
110
111
|
- ".travis.yml"
|
@@ -180,6 +181,10 @@ files:
|
|
180
181
|
- spec/unit/action/destroy_domain_spec.rb
|
181
182
|
- spec/unit/action/set_name_of_domain_spec.rb
|
182
183
|
- spec/unit/action/wait_till_up_spec.rb
|
184
|
+
- spec/unit/config_spec.rb
|
185
|
+
- spec/unit/templates/domain_all_settings.xml
|
186
|
+
- spec/unit/templates/domain_defaults.xml
|
187
|
+
- spec/unit/templates/domain_spec.rb
|
183
188
|
- tools/create_box.sh
|
184
189
|
- tools/prepare_redhat_for_box.sh
|
185
190
|
- vagrant-libvirt.gemspec
|
@@ -203,7 +208,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
203
208
|
version: '0'
|
204
209
|
requirements: []
|
205
210
|
rubyforge_project:
|
206
|
-
rubygems_version: 2.5.
|
211
|
+
rubygems_version: 2.5.2
|
207
212
|
signing_key:
|
208
213
|
specification_version: 4
|
209
214
|
summary: libvirt provider for Vagrant.
|
@@ -215,3 +220,7 @@ test_files:
|
|
215
220
|
- spec/unit/action/destroy_domain_spec.rb
|
216
221
|
- spec/unit/action/set_name_of_domain_spec.rb
|
217
222
|
- spec/unit/action/wait_till_up_spec.rb
|
223
|
+
- spec/unit/config_spec.rb
|
224
|
+
- spec/unit/templates/domain_all_settings.xml
|
225
|
+
- spec/unit/templates/domain_defaults.xml
|
226
|
+
- spec/unit/templates/domain_spec.rb
|