cloudstack-cli 1.6.1 → 1.6.2

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: ee26a09aaed192016bdc6d8d3939ab5ef53160b7
4
- data.tar.gz: f192f81dc6f37d695bb3f9682577278f6ca9151e
3
+ metadata.gz: b703d1d9fe944c52b7c8d57c21f5620e5d29d54a
4
+ data.tar.gz: 150b9a0143f647d9a37808cdfa6229418d8fdaa9
5
5
  SHA512:
6
- metadata.gz: be5730f23ddb4aa98656b57c926c87fa54a3ddae00bc382b1c707f9a21da008f8e46a11683d514ad95dc78b56aa0dbf5f8eac4376a479c2bb0603191f0bdc2b9
7
- data.tar.gz: 1e3049d893627b76b51055fb3555947f52dd5254dd6dfff74c6a4f626b650255381d2eccd70edda444f3456929398690787559c18dd5f369f2fc7beeff78810b
6
+ metadata.gz: 99956c56a34b235e00866a7494ac20801f0da4360d2e6849c6b146a0ad794dbcdc0a7e743713a3459f37a9483de48c66833c7660ccc4efef2bc20db9211b1c9e
7
+ data.tar.gz: d816f2b3fb6ae983333ce5da1fa55e805a86174a99ba47d3958d4c423fe4310ac9e3390b7ee3583cf05a9e35126fc9d2c64a3931de26ba0685d5e792bd3bcac5
data/Gemfile CHANGED
@@ -1,10 +1,10 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- group :development do
4
- gem 'cloudstack_client',
5
- path: '../cloudstack_client/',
6
- branch: 'master'
7
- end
3
+ # group :development do
4
+ # gem 'cloudstack_client',
5
+ # path: '../cloudstack_client/',
6
+ # branch: 'master'
7
+ # end
8
8
 
9
9
  # Specify your gem's dependencies in cloudstack-cli.gemspec
10
10
  gemspec
data/Gemfile.lock CHANGED
@@ -1,20 +1,16 @@
1
- PATH
2
- remote: ../cloudstack_client/
3
- specs:
4
- cloudstack_client (1.5.3)
5
-
6
1
  PATH
7
2
  remote: .
8
3
  specs:
9
- cloudstack-cli (1.6.1)
4
+ cloudstack-cli (1.6.2)
10
5
  cloudstack_client (~> 1.5.3)
11
6
  thor (~> 0.20.0)
12
7
 
13
8
  GEM
14
9
  remote: https://rubygems.org/
15
10
  specs:
11
+ cloudstack_client (1.5.3)
16
12
  minitest (5.10.3)
17
- rake (12.0.0)
13
+ rake (12.3.0)
18
14
  thor (0.20.0)
19
15
 
20
16
  PLATFORMS
@@ -22,9 +18,8 @@ PLATFORMS
22
18
 
23
19
  DEPENDENCIES
24
20
  cloudstack-cli!
25
- cloudstack_client!
26
21
  minitest (~> 5.9)
27
22
  rake (~> 12.0)
28
23
 
29
24
  BUNDLED WITH
30
- 1.13.7
25
+ 1.16.0
@@ -18,6 +18,7 @@ class VirtualMachine < CloudstackCli::Base
18
18
  desc: "number of concurrent commands to execute"
19
19
  option :format, default: "table",
20
20
  enum: %w(table json yaml)
21
+ option :force, desc: "execute command without confirmation", type: :boolean, aliases: '-f'
21
22
  def list
22
23
  add_filters_to_options("listVirtualMachines") if options[:filter]
23
24
  resolve_account
@@ -35,7 +36,7 @@ class VirtualMachine < CloudstackCli::Base
35
36
  puts "No virtual machines found."
36
37
  else
37
38
  print_virtual_machines(virtual_machines)
38
- execute_virtual_machines_commands(command, virtual_machines) if command
39
+ execute_virtual_machines_commands(command, virtual_machines, options) if command
39
40
  end
40
41
  end
41
42
 
@@ -46,6 +47,7 @@ class VirtualMachine < CloudstackCli::Base
46
47
  option :concurrency, type: :numeric, default: 10, aliases: '-C',
47
48
  desc: "number of concurrent command to execute"
48
49
  option :format, default: :table, enum: %w(table json yaml)
50
+ option :force, desc: "execute command without confirmation", type: :boolean, aliases: '-f'
49
51
  def list_from_file(file)
50
52
  virtual_machines = parse_file(file)["virtual_machines"]
51
53
  if virtual_machines.size < 1
@@ -54,7 +56,8 @@ class VirtualMachine < CloudstackCli::Base
54
56
  print_virtual_machines(virtual_machines)
55
57
  execute_virtual_machines_commands(
56
58
  options[:command].downcase,
57
- virtual_machines
59
+ virtual_machines,
60
+ options
58
61
  ) if options[:command]
59
62
  end
60
63
  end
@@ -322,12 +325,13 @@ class VirtualMachine < CloudstackCli::Base
322
325
  end
323
326
  end
324
327
 
325
- def execute_virtual_machines_commands(command, virtual_machines)
328
+ def execute_virtual_machines_commands(command, virtual_machines, options = {})
326
329
  unless %w(start stop reboot).include?(command)
327
330
  say "\nCommand #{options[:command]} not supported.", :red
328
331
  exit 1
329
332
  end
330
- exit unless yes?("\n#{command.capitalize} the virtual machine(s) above? [y/N]:", :magenta)
333
+ exit unless options[:force] ||
334
+ yes?("\n#{command.capitalize} the virtual machine(s) above? [y/N]:", :magenta)
331
335
 
332
336
  jobs = virtual_machines.map do |vm|
333
337
  {
@@ -1,3 +1,3 @@
1
1
  module CloudstackCli
2
- VERSION = "1.6.1"
2
+ VERSION = "1.6.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudstack-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.1
4
+ version: 1.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nik Wolfgramm
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-17 00:00:00.000000000 Z
11
+ date: 2017-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -154,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
154
154
  version: '0'
155
155
  requirements: []
156
156
  rubyforge_project:
157
- rubygems_version: 2.5.2
157
+ rubygems_version: 2.6.14
158
158
  signing_key:
159
159
  specification_version: 4
160
160
  summary: cloudstack-cli CloudStack API client