vagrant-mutate 0.2.0 → 0.2.1
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.
- data/CHANGELOG.md +8 -0
- data/README.md +3 -2
- data/lib/vagrant-mutate/box/kvm.rb +5 -1
- data/lib/vagrant-mutate/version.rb +1 -1
- data/test/expected_output/kvm/libvirt/Vagrantfile +11 -0
- data/test/expected_output/kvm/libvirt/box.img +0 -0
- data/test/expected_output/kvm/libvirt/metadata.json +1 -0
- data/test/input/kvm/mutate-test.box +0 -0
- data/test/test.rb +2 -1
- metadata +7 -1
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
# 0.2.1 (2014-01-02)
|
2
|
+
* Support kvm as input (#17)
|
3
|
+
|
4
|
+
# 0.2.0 (2014-01-02)
|
5
|
+
* Fix how box is loaded by name (#19)
|
6
|
+
* Quit if input and output provider are the same (#27)
|
7
|
+
* Support libvirt as input (#18)
|
8
|
+
|
1
9
|
# 0.1.5 (2013-12-17)
|
2
10
|
* Preserve dsik interface type when coverting to KVM (#21)
|
3
11
|
* Remove dependency in minitar (#24)
|
data/README.md
CHANGED
@@ -1,18 +1,19 @@
|
|
1
1
|
# Vagrant-Mutate
|
2
2
|
|
3
|
-
Vagrant-mutate is a
|
3
|
+
Vagrant-mutate is a vagrant plugin to convert vagrant boxes to work with different providers.
|
4
4
|
|
5
5
|
## Supported Conversions
|
6
6
|
|
7
7
|
* Virtualbox to kvm
|
8
8
|
* Virtualbox to libvirt
|
9
9
|
* Libvirt to kvm
|
10
|
+
* Kvm to libvirt
|
10
11
|
|
11
12
|
## Compatibility
|
12
13
|
|
13
14
|
Vagrant-mutate has been tested against the following versions. It may work with other versions too.
|
14
15
|
|
15
|
-
* vagrant 1.3.5
|
16
|
+
* [vagrant](http://www.vagrantup.com) 1.3.5
|
16
17
|
* [vagrant-kvm](https://github.com/adrahon/vagrant-kvm) 0.1.4
|
17
18
|
* [vagrant-libvirt](https://github.com/pradels/vagrant-libvirt) 0.0.11
|
18
19
|
|
@@ -7,12 +7,16 @@ module VagrantMutate
|
|
7
7
|
def initialize(env, name, dir)
|
8
8
|
super
|
9
9
|
@provider_name = 'kvm'
|
10
|
-
@supported_input =
|
10
|
+
@supported_input = true
|
11
11
|
@supported_output = true
|
12
12
|
@image_format = 'qcow2'
|
13
13
|
@image_name = 'box-disk1.img'
|
14
14
|
end
|
15
15
|
|
16
|
+
# TODO implement these methods
|
17
|
+
# architecture, mac_address, cpus, memor, disk_interface
|
18
|
+
# to support converting to providers besides libvirt
|
19
|
+
|
16
20
|
end
|
17
21
|
end
|
18
22
|
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
Vagrant::Config.run do |config|
|
2
|
+
# This Vagrantfile is auto-generated by `vagrant package` to contain
|
3
|
+
# the MAC address of the box. Custom configuration should be placed in
|
4
|
+
# the actual `Vagrantfile` in this box.
|
5
|
+
config.vm.base_mac = "08002755B88D"
|
6
|
+
end
|
7
|
+
|
8
|
+
# Load include vagrant file if it exists after the auto-generated
|
9
|
+
# so it can override any of the settings
|
10
|
+
include_vagrantfile = File.expand_path("../include/_Vagrantfile", __FILE__)
|
11
|
+
load include_vagrantfile if File.exist?(include_vagrantfile)
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
{"provider":"libvirt","format":"qcow2","virtual_size":1}
|
Binary file
|
data/test/test.rb
CHANGED
@@ -30,7 +30,7 @@ def install_plugin
|
|
30
30
|
end
|
31
31
|
|
32
32
|
# convering libvirt to kvm has some random output which we must replace
|
33
|
-
# with the static "random" value in the
|
33
|
+
# with the static "random" value in the sample output we are comparing against
|
34
34
|
def derandomize_output(input, output_dir)
|
35
35
|
if input == 'libvirt'
|
36
36
|
if File.split(output_dir).last == 'kvm'
|
@@ -79,6 +79,7 @@ cleanup
|
|
79
79
|
build_plugin
|
80
80
|
failures = test( 'virtualbox', ['kvm', 'libvirt'] )
|
81
81
|
failures += test( 'libvirt', ['kvm'] )
|
82
|
+
failures += test( 'kvm', ['libvirt'] )
|
82
83
|
|
83
84
|
unless failures.empty?
|
84
85
|
puts "\nTESTS FAILED"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-mutate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -70,6 +70,9 @@ files:
|
|
70
70
|
- lib/vagrant-mutate/version.rb
|
71
71
|
- locales/en.yml
|
72
72
|
- templates/kvm/box.xml.erb
|
73
|
+
- test/expected_output/kvm/libvirt/Vagrantfile
|
74
|
+
- test/expected_output/kvm/libvirt/box.img
|
75
|
+
- test/expected_output/kvm/libvirt/metadata.json
|
73
76
|
- test/expected_output/libvirt/kvm/Vagrantfile
|
74
77
|
- test/expected_output/libvirt/kvm/box-disk1.img
|
75
78
|
- test/expected_output/libvirt/kvm/box.xml
|
@@ -112,6 +115,9 @@ signing_key:
|
|
112
115
|
specification_version: 3
|
113
116
|
summary: Convert vagrant boxes to work with different providers
|
114
117
|
test_files:
|
118
|
+
- test/expected_output/kvm/libvirt/Vagrantfile
|
119
|
+
- test/expected_output/kvm/libvirt/box.img
|
120
|
+
- test/expected_output/kvm/libvirt/metadata.json
|
115
121
|
- test/expected_output/libvirt/kvm/Vagrantfile
|
116
122
|
- test/expected_output/libvirt/kvm/box-disk1.img
|
117
123
|
- test/expected_output/libvirt/kvm/box.xml
|