vmfloaty 0.2.17 → 0.2.18

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: b8849ed21080f1589fd4f70e59c9f1ce14fcf914
4
- data.tar.gz: 5db00fc0a141cab894f92322a271fe6245774264
3
+ metadata.gz: 7039189689c027d1c90c47fce96049c0a876a8e5
4
+ data.tar.gz: f5ec0844421b9f8fb970335f8b7ae0382fdeb441
5
5
  SHA512:
6
- metadata.gz: d5048f063419586c37e31a41bc2b1a747afc0e42125c9ddcd2abacb8eaeb2e01a7b9efa6ba672bb6591f3f740712d2c32a938cd4afa57c47166202486e43b3b1
7
- data.tar.gz: 2a0bdc61b773e2d3797defe336dda52f0f42c7e949c80c89a8ff2c51691f50351d9a713ac909ad3f6ed00b5a7eea329c6bcf65b2470602252875a1aa8b870243
6
+ metadata.gz: 7775b4c7efd851d909be7705249068c7d8b150b7e722411baf9257d4e3be3d0371e6581a981b00c9f24b4de03eae6d8de52953c3da2bc9982a03b6bc79fe90c0
7
+ data.tar.gz: 7142c0948f2922277986bc9169cda6698721e3789ececb782d619b2c0c0e58eaa09b533476002476b4503713098e41974cea9bba5b5d0e76b4e522a89f814dbb
data/lib/vmfloaty.rb CHANGED
@@ -159,6 +159,7 @@ class Vmfloaty
159
159
  c.example 'Schedules the deletion of a host or hosts', 'floaty delete myhost1,myhost2 --url http://vmpooler.example.com'
160
160
  c.option '--verbose', 'Enables verbose output'
161
161
  c.option '--all', 'Deletes all vms acquired by a token'
162
+ c.option '-f', 'Does not prompt user when deleting all vms'
162
163
  c.option '--token STRING', String, 'Token for vmpooler'
163
164
  c.option '--url STRING', String, 'URL of vmpooler'
164
165
  c.action do |args, options|
@@ -167,6 +168,7 @@ class Vmfloaty
167
168
  token = options.token || config['token']
168
169
  url = options.url ||= config['url']
169
170
  delete_all = options.all
171
+ force = options.f
170
172
 
171
173
  if delete_all
172
174
  # get vms with token
@@ -183,8 +185,14 @@ class Vmfloaty
183
185
  if ! running_vms.nil?
184
186
  Utils.prettyprint_hosts(running_vms, verbose, url)
185
187
  # query y/n
186
- puts ""
187
- ans = agree("Delete all VMs associated with token #{token}? [y/N]")
188
+ puts
189
+
190
+ if force
191
+ ans = true
192
+ else
193
+ ans = agree("Delete all VMs associated with token #{token}? [y/N]")
194
+ end
195
+
188
196
  if ans
189
197
  # delete vms
190
198
  Pooler.delete(verbose, url, running_vms, token)
@@ -1,6 +1,6 @@
1
1
 
2
2
  class Version
3
- @version = '0.2.17'
3
+ @version = '0.2.18'
4
4
 
5
5
  def self.get
6
6
  @version
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vmfloaty
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.17
4
+ version: 0.2.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Cain
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-16 00:00:00.000000000 Z
11
+ date: 2015-11-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: commander