vagrant-commit 0.6.4 → 0.7.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 67f17a6c13e9b073d04c374fce119854900b35cc67ac51428574945cab4bdae5
4
- data.tar.gz: f77225cdb10d2c76f499f5c5934610dba7925e768bc49498d5e28f495abdd90d
3
+ metadata.gz: f0a4d4e405ad458bfaca30eca8c80be990ef69104720be7a7cf9689574869b29
4
+ data.tar.gz: 6c81d47472e6e3b092a45186f60a4a4f7353c6cf1d204a79d89fa42ce8930497
5
5
  SHA512:
6
- metadata.gz: bff04b0591a5808e6682c1baa6b60a47bd68c6eedce96506e45f6f494be1a1a6f9cd25d4d9eaabad229f2e7f2bcd2c02cdcbe4fb77a176c8d3be669052dd6079
7
- data.tar.gz: e31dd7568dd7146c415f7df36a34c8a2450687fca5b1bfd33defcb2b0835f40c2cefbfc98502b177e9821b1894b343dd8551f247a8feb54d50d5b98cb6ee5309
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
- {data_dir: machine.data_dir}
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(provider.to_s)
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"
@@ -1,5 +1,5 @@
1
1
  module Vagrant
2
2
  module Commit
3
- VERSION = "0.6.4"
3
+ VERSION = "0.7.0"
4
4
  end
5
5
  end
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.6.4
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-05 00:00:00.000000000 Z
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: