vagrant-smartos-zones 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e26bf73ab61dd9d5550e9412d9967db82074561a
|
4
|
+
data.tar.gz: 637e034727555d9fcf77b600a156d280c077c080
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 253deacdbd67a309dd08ef2afe3bf59304c9768ac48b78e7bc39c7cf97453ba42b257097a6a81a7ff8c6a52714b6b9467dc4540ccb14efebaf7bc809eda82808
|
7
|
+
data.tar.gz: 6a182725124c57bf23179a6c89316e91e7af889f76cb61e27e8a6fe341fb445fcb719dcdf2532d48c165a1f8cda2f3567da9c0b7d31c84beb23cfc9c94d6aaf1
|
@@ -18,8 +18,8 @@ module Vagrant
|
|
18
18
|
@machine = machine
|
19
19
|
end
|
20
20
|
|
21
|
-
def self.create(name, zone)
|
22
|
-
new(name, zone).create
|
21
|
+
def self.create(name, zone, machine)
|
22
|
+
new(name, zone, machine).create
|
23
23
|
end
|
24
24
|
|
25
25
|
def self.install(name, machine)
|
@@ -29,17 +29,13 @@ module Vagrant
|
|
29
29
|
def create
|
30
30
|
Zones::Util::Datasets.new(machine.env).setup_smartos_directories
|
31
31
|
prepare_gz
|
32
|
-
|
33
|
-
|
32
|
+
create_dataset
|
33
|
+
download
|
34
34
|
write_manifest
|
35
35
|
end
|
36
36
|
|
37
37
|
def exists?
|
38
|
-
|
39
|
-
with_gz(cmd) do |output|
|
40
|
-
return true if output.strip == remote_filename
|
41
|
-
end
|
42
|
-
false
|
38
|
+
machine.communicate.gz_test('ls %s' % remote_filename)
|
43
39
|
end
|
44
40
|
|
45
41
|
def install
|
@@ -55,7 +51,7 @@ module Vagrant
|
|
55
51
|
private
|
56
52
|
|
57
53
|
def prepare_gz
|
58
|
-
with_gz('pfexec mkdir /zones/vagrant')
|
54
|
+
with_gz('pfexec mkdir -p /zones/vagrant')
|
59
55
|
with_gz('pfexec chown vagrant:vagrant /zones/vagrant')
|
60
56
|
end
|
61
57
|
|
@@ -69,7 +65,7 @@ module Vagrant
|
|
69
65
|
zone.stop
|
70
66
|
Models::Snapshot.around(zone) do |snapshot|
|
71
67
|
machine.ui.info(I18n.t('vagrant.smartos.zones.commands.dataset.save'))
|
72
|
-
cmd = 'pfexec /usr/bin/bash -l -c "/usr/sbin/zfs send %s | /usr/bin/
|
68
|
+
cmd = 'pfexec /usr/bin/bash -l -c "/usr/sbin/zfs send %s | /usr/bin/gzip > %s"'
|
73
69
|
with_gz(cmd % [snapshot.path, remote_filename])
|
74
70
|
end
|
75
71
|
end
|
@@ -92,7 +88,7 @@ module Vagrant
|
|
92
88
|
end
|
93
89
|
|
94
90
|
def filename
|
95
|
-
'%s.zfs.
|
91
|
+
'%s.zfs.gz' % name
|
96
92
|
end
|
97
93
|
|
98
94
|
def local_filename
|
@@ -23,11 +23,11 @@ module Vagrant
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def sha1(name)
|
26
|
-
Digest::SHA1.file(dataset_dir.join("#{name}.zfs.
|
26
|
+
Digest::SHA1.file(dataset_dir.join("#{name}.zfs.gz")).hexdigest
|
27
27
|
end
|
28
28
|
|
29
29
|
def size(name)
|
30
|
-
::File.size(dataset_dir.join("#{name}.zfs.
|
30
|
+
::File.size(dataset_dir.join("#{name}.zfs.gz"))
|
31
31
|
end
|
32
32
|
|
33
33
|
private
|
@@ -41,8 +41,8 @@ module Vagrant
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def datasets
|
44
|
-
Dir[dataset_dir.join('*.zfs.
|
45
|
-
File.basename(f, '.zfs.
|
44
|
+
Dir[dataset_dir.join('*.zfs.gz')].map do |f|
|
45
|
+
File.basename(f, '.zfs.gz')
|
46
46
|
end.sort
|
47
47
|
end
|
48
48
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-smartos-zones
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Saxby
|
@@ -192,3 +192,4 @@ test_files:
|
|
192
192
|
- test/integration/default/serverspec/user_spec.rb
|
193
193
|
- test/templates/Vagrantfile.smartos.erb
|
194
194
|
- test/templates/bootstrap.sh
|
195
|
+
has_rdoc:
|