vagrant-commit 0.6.4 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vagrant-commit/command.rb +16 -4
- data/lib/vagrant-commit/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f0a4d4e405ad458bfaca30eca8c80be990ef69104720be7a7cf9689574869b29
|
4
|
+
data.tar.gz: 6c81d47472e6e3b092a45186f60a4a4f7353c6cf1d204a79d89fa42ce8930497
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f729be0ae42f3d341d404d54cdc5e0013c2731f7083cc7b9354e4ea805f08ee27a199a9deb43a55d282b29616f3aa171cc2acaeb86234dfd54a046345771826
|
7
|
+
data.tar.gz: 15cdfcac68a2afdc510f7517d0e7fde8a12247e38a639d4ea051158b10ff103654b13ca6d3fa929de5b4724cc58984aaa15341e05d70de62c4719cb12b0513e2
|
@@ -62,8 +62,22 @@ module Vagrant
|
|
62
62
|
module ShowInfo
|
63
63
|
class Command < Vagrant.plugin('2', :command)
|
64
64
|
|
65
|
+
def get_volumes(machine)
|
66
|
+
server = machine.provider.driver.connection.servers.get(machine.id.to_s)
|
67
|
+
server.volumes.map do |vol|
|
68
|
+
`sudo qemu-img info #{vol.path} --force | grep 'backing file:' | cut -d ':' -f2`.chomp
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
65
72
|
def get_machine_info(machine)
|
66
|
-
|
73
|
+
collection = Vagrant::BoxCollection.new(@env.boxes_path)
|
74
|
+
machine_name = machine.name.to_s
|
75
|
+
box = collection.find(machine_name, :libvirt, "> 0")
|
76
|
+
{
|
77
|
+
data_dir: machine.data_dir,
|
78
|
+
boxes_path: @env.boxes_path,
|
79
|
+
# volumes: get_volumes(machine),
|
80
|
+
}
|
67
81
|
end
|
68
82
|
|
69
83
|
def execute
|
@@ -132,12 +146,10 @@ module Vagrant
|
|
132
146
|
@env.ui.error("Box #{src_boxname} not found")
|
133
147
|
return 1
|
134
148
|
end
|
135
|
-
provider = box.metadata["provider"]
|
136
|
-
|
137
149
|
# create necessary files in the boxes path
|
138
150
|
root_dir = @env.boxes_path
|
139
151
|
version = "0"
|
140
|
-
new_box_dir = root_dir.join(target_boxname).join(version).join(
|
152
|
+
new_box_dir = root_dir.join(target_boxname).join(version).join("libvirt")
|
141
153
|
if File.exist?(new_box_dir)
|
142
154
|
ans = @env.ui.ask("Box #{target_boxname} exists. What to do? [use/remove/exit] ")
|
143
155
|
if ans.strip.downcase == "use"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-commit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vitalii Abetkin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-06-
|
11
|
+
date: 2019-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A Vagrant plugin that does qemu-img commit
|
14
14
|
email:
|