vagrant-vmpooler 0.1.7 → 0.1.8
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 +4 -4
- data/lib/vagrant-vmpooler/action/delete_server.rb +6 -2
- data/lib/vagrant-vmpooler/config.rb +16 -10
- data/lib/vagrant-vmpooler/version.rb +1 -1
- data/locales/en.yml +1 -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: 8fadbd4b695dd48472c8158d877bd654b238ad6e
|
|
4
|
+
data.tar.gz: 3d0710a90a35748e61eb80e3ddfeeb75b54b2f88
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
#
|
|
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].
|
|
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
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
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
|
# ----------------
|
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
|
|
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.
|
|
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-
|
|
11
|
+
date: 2016-11-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: vmfloaty
|