vagrant-vmpooler 0.1.7 → 0.1.8

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: 766ebbfbed3493e94abc066db94fade8d6f816b0
4
- data.tar.gz: 8ef29b706b2d49732d8f68ad9bd5b0f04c334bac
3
+ metadata.gz: 8fadbd4b695dd48472c8158d877bd654b238ad6e
4
+ data.tar.gz: 3d0710a90a35748e61eb80e3ddfeeb75b54b2f88
5
5
  SHA512:
6
- metadata.gz: 89bef257749da59cfeac0e2ed5022c2001567a692aa5cc46e45bc61d27d83755e1758fa1e6c92cb192eb80e97cafd42f10c39a0e62d7648cc993c0d7cfa46a91
7
- data.tar.gz: 93b72c6b115612165e2fb2998df6b0f0369706441d3b549560ca34c3608ee101eebbfb1eb368910f44f99d1f84979a8f711911eea2cf47f2adf406a361e7d9ba
6
+ metadata.gz: 5f5fa0ff65dab5bfc82280cf317c026cd613140105a361f94301339946c51f54230ed18fe3f298da3b10e2222eb711701cac3378ff670b851b27b109a6aaf775
7
+ data.tar.gz: 19519bcbc87b9b4c86b54a8fa229c545c8fc69bd9712ab5a1b4f75833494244a8e960f842570f0a91ab7dc460ff360d970ef441ef166a14fcfff228ee729d705
@@ -33,10 +33,14 @@ module VagrantPlugins
33
33
  response_body = Pooler.delete(verbose, url, os, token)
34
34
 
35
35
  if response_body[id]['ok'] == false
36
- # the only way this can happen is if the vm existed at one point
36
+ # This could potentially happen if the vm was created
37
+ # but later on the vmfloaty settings changed or were
38
+ # incorrect
39
+
40
+ # Otherwise, the only way this can happen is if the vm existed at one point
37
41
  # but got deleted from vmpoolers redis db. We should probably
38
42
  # still delete it from vagrants internal state if this is true
39
- env[:ui].info(I18n.t("vagrant_vmpooler.not_deleted"))
43
+ env[:ui].warn(I18n.t("vagrant_vmpooler.not_deleted"))
40
44
  else
41
45
  env[:ui].info(I18n.t("vagrant_vmpooler.deleted"))
42
46
  env[:machine].id = nil
@@ -63,23 +63,29 @@ module VagrantPlugins
63
63
  def finalize!
64
64
  conf_file = read_config
65
65
 
66
- if conf_file['token']
67
- @token = conf_file['token']
68
- else
69
- @token = nil
70
- end
71
-
72
- if conf_file['url']
73
- @url = conf_file['url']
74
- else
75
- @url = nil
66
+ # if conf_file is false the file
67
+ # exists but there are no keys inside it
68
+ if conf_file != false
69
+ if conf_file['token']
70
+ @token = conf_file['token']
71
+ else
72
+ @token = nil
73
+ end
74
+
75
+ if conf_file['url']
76
+ @url = conf_file['url']
77
+ else
78
+ @url = nil
79
+ end
76
80
  end
77
81
 
82
+ @url = nil if @url == UNSET_VALUE
78
83
  @verbose = false if @verbose == UNSET_VALUE
79
84
  @os = nil if @os == UNSET_VALUE
80
85
  @ttl = nil if @ttl == UNSET_VALUE
81
86
  @disk = nil if @disk == UNSET_VALUE
82
87
  @password = nil if @password == UNSET_VALUE
88
+ @token = nil if @token == UNSET_VALUE
83
89
  end
84
90
 
85
91
  # ----------------
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module Vmpooler
3
- VERSION = '0.1.7'
3
+ VERSION = '0.1.8'
4
4
  end
5
5
  end
data/locales/en.yml CHANGED
@@ -94,7 +94,7 @@ en:
94
94
  failed_disk_extend: |-
95
95
  Could not extend size of disk on vm.
96
96
  vmpooler_url_error: |-
97
- No user was provided to connect to vmpooler.
97
+ No url was provided to connect to vmpooler.
98
98
  no_os_error: |-
99
99
  No operatingsystem flavor was set.
100
100
  bad_request: |-
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.7
4
+ version: 0.1.8
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-10-11 00:00:00.000000000 Z
11
+ date: 2016-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: vmfloaty