vagrant-vmpooler 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/lib/vagrant-vmpooler/action/create_server.rb +24 -7
- data/lib/vagrant-vmpooler/action/take_snapshot.rb +8 -3
- data/lib/vagrant-vmpooler/version.rb +1 -1
- data/locales/en.yml +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 766ebbfbed3493e94abc066db94fade8d6f816b0
|
4
|
+
data.tar.gz: 8ef29b706b2d49732d8f68ad9bd5b0f04c334bac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89bef257749da59cfeac0e2ed5022c2001567a692aa5cc46e45bc61d27d83755e1758fa1e6c92cb192eb80e97cafd42f10c39a0e62d7648cc993c0d7cfa46a91
|
7
|
+
data.tar.gz: 93b72c6b115612165e2fb2998df6b0f0369706441d3b549560ca34c3608ee101eebbfb1eb368910f44f99d1f84979a8f711911eea2cf47f2adf406a361e7d9ba
|
data/Gemfile
CHANGED
@@ -66,21 +66,38 @@ module VagrantPlugins
|
|
66
66
|
tags = {}
|
67
67
|
tags['vagrant-vmpooler'] = VagrantPlugins::Vmpooler::VERSION
|
68
68
|
|
69
|
-
|
70
|
-
|
71
|
-
|
69
|
+
begin
|
70
|
+
response_body = Pooler.modify(verbose, url, server_name, token, nil, tags)
|
71
|
+
if response_body['ok'] == false
|
72
|
+
env[:ui].warn(I18n.t("vagrant_vmpooler.errors.failed_tag"))
|
73
|
+
end
|
74
|
+
rescue TokenError => e
|
75
|
+
env[:ui].warn(I18n.t("vagrant_vmpooler.errors.no_token_error"))
|
76
|
+
env[:ui].warn(I18n.t("vagrant_vmpooler.errors.failed_tags"))
|
72
77
|
end
|
73
78
|
|
79
|
+
|
74
80
|
if ttl
|
75
|
-
|
76
|
-
|
81
|
+
begin
|
82
|
+
response_body = Pooler.modify(verbose, url, server_name, token, ttl, nil)
|
83
|
+
if response_body['ok'] == false
|
84
|
+
env[:ui].warn(I18n.t("vagrant_vmpooler.errors.failed_ttl"))
|
85
|
+
end
|
86
|
+
rescue TokenError => e
|
87
|
+
env[:ui].warn(I18n.t("vagrant_vmpooler.errors.no_token_error"))
|
77
88
|
env[:ui].warn(I18n.t("vagrant_vmpooler.errors.failed_ttl"))
|
78
89
|
end
|
79
90
|
end
|
80
91
|
|
81
92
|
if disk
|
82
|
-
|
83
|
-
|
93
|
+
begin
|
94
|
+
response_body = Pooler.disk(verbose, url, server_name, token, disk)
|
95
|
+
|
96
|
+
if response_body['ok'] == false
|
97
|
+
env[:ui].warn(I18n.t("vagrant_vmpooler.errors.failed_disk_extend"))
|
98
|
+
end
|
99
|
+
rescue TokenError => e
|
100
|
+
env[:ui].warn(I18n.t("vagrant_vmpooler.errors.no_token_error"))
|
84
101
|
env[:ui].warn(I18n.t("vagrant_vmpooler.errors.failed_disk_extend"))
|
85
102
|
end
|
86
103
|
end
|
@@ -20,10 +20,15 @@ module VagrantPlugins
|
|
20
20
|
url = provider_config.url
|
21
21
|
verbose = provider_config.verbose
|
22
22
|
hostname = env[:machine].id
|
23
|
-
|
24
|
-
|
23
|
+
begin
|
24
|
+
response = Pooler.snapshot(verbose, url, hostname, token)
|
25
|
+
if response['ok'] == false
|
26
|
+
env[:ui].info(I81n.t("vagrant_vmpooler.errors.failed_snapshot"))
|
27
|
+
env[:ui].info(response)
|
28
|
+
end
|
29
|
+
rescue TokenError => e
|
30
|
+
env[:ui].warn(I18n.t("vagrant_vmpooler.errors.no_token_error"))
|
25
31
|
env[:ui].info(I81n.t("vagrant_vmpooler.errors.failed_snapshot"))
|
26
|
-
env[:ui].info(response)
|
27
32
|
end
|
28
33
|
end
|
29
34
|
|
data/locales/en.yml
CHANGED
@@ -79,6 +79,8 @@ en:
|
|
79
79
|
A disk size is required for all disk specifications.
|
80
80
|
|
81
81
|
errors:
|
82
|
+
no_token_error: |-
|
83
|
+
Token provided is nil, could not perform operation...
|
82
84
|
no_install_rsync: |-
|
83
85
|
Did not install rsync
|
84
86
|
install_rsync_error: |-
|
@@ -86,7 +88,7 @@ en:
|
|
86
88
|
failed_snapshot: |-
|
87
89
|
Could not snapshot server.
|
88
90
|
failed_ttl: |-
|
89
|
-
Could not extend
|
91
|
+
Could not extend lifetime on vm.
|
90
92
|
failed_tags: |-
|
91
93
|
Failed to tag vm.
|
92
94
|
failed_disk_extend: |-
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-vmpooler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Cain
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: vmfloaty
|