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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5d940e98cf20dcaf718a7e09499790febb1a0b7a
4
- data.tar.gz: 70a13319df7418a492acf928e29634fb36bc1786
3
+ metadata.gz: 766ebbfbed3493e94abc066db94fade8d6f816b0
4
+ data.tar.gz: 8ef29b706b2d49732d8f68ad9bd5b0f04c334bac
5
5
  SHA512:
6
- metadata.gz: abfd2fae9e113fb6e77155dbb4bc0ba665a41aa3cdd29a2089e6bb1a67cb58943756b43d86e20891b42ddff67e31463f1ffaec4e11e5422b5313de8b1a2236b2
7
- data.tar.gz: 2f2921074f9814b701dc077d41e1135a8caed95800a1b5a7d1985f486974977ca3dc6eba563b8fff08ee5f5af72c8c27ea405cf65589e0cbe30343086873ea8b
6
+ metadata.gz: 89bef257749da59cfeac0e2ed5022c2001567a692aa5cc46e45bc61d27d83755e1758fa1e6c92cb192eb80e97cafd42f10c39a0e62d7648cc993c0d7cfa46a91
7
+ data.tar.gz: 93b72c6b115612165e2fb2998df6b0f0369706441d3b549560ca34c3608ee101eebbfb1eb368910f44f99d1f84979a8f711911eea2cf47f2adf406a361e7d9ba
data/Gemfile CHANGED
@@ -2,7 +2,7 @@ source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
4
 
5
- gem "vmfloaty", "0.6.0"
5
+ gem "vmfloaty", "0.7.1"
6
6
 
7
7
  group :development do
8
8
  gem "vagrant", git: "https://github.com/mitchellh/vagrant.git"
@@ -66,21 +66,38 @@ module VagrantPlugins
66
66
  tags = {}
67
67
  tags['vagrant-vmpooler'] = VagrantPlugins::Vmpooler::VERSION
68
68
 
69
- response_body = Pooler.modify(verbose, url, server_name, token, nil, tags)
70
- if response_body['ok'] == false
71
- env[:ui].warn(I18n.t("vagrant_vmpooler.errors.failed_tag"))
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
- response_body = Pooler.modify(verbose, url, server_name, token, ttl, nil)
76
- if response_body['ok'] == false
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
- response_body = Pooler.disk(verbose, url, server_name, token, disk)
83
- if response_body['ok'] == false
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
- response = Pooler.snapshot(verbose, url, hostname, token)
24
- if response['ok'] == false
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
 
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module Vmpooler
3
- VERSION = '0.1.6'
3
+ VERSION = '0.1.7'
4
4
  end
5
5
  end
@@ -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 TTL on vm.
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.6
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-09-13 00:00:00.000000000 Z
11
+ date: 2016-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: vmfloaty