bosh_cli 1.3200.0 → 1.3202.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7dd94fb8759f3cc9ca5ad4b899a4f29bff7d8e3c
4
- data.tar.gz: 70cb8cf9616d0fcf9b6ed37b73c982693a559e13
3
+ metadata.gz: 57bf0c54be21cb26fe042e6cb2a3153187a4a9a9
4
+ data.tar.gz: b2639e85670849be3a505b9f4d99ca2784a2814d
5
5
  SHA512:
6
- metadata.gz: 5ab61c54f0ef38880cd3e166b98630cbe42476bfd08967f746c805522c73729c6c920641e31be22ad0a0a117c15cc49a1cc14985067815b8b4b4bdb0f5cd6923
7
- data.tar.gz: e9e4c662fb4a30fb7f4b75e03f2560a4143f327d98fb202a2f7fb7f6c84596202de37d11af861da1f3aab19f2cb005a60022b118c885f8317ba3a622db7aa7d1
6
+ metadata.gz: 6593b135fbd3099be5a2f6e68df6fc50ab46ead9583e4d1b13ea216efea37ffa6497f1bf1bdb0f608f7227b302ec41cde2ebe21dbb13280dc4dcb6c91823b07a
7
+ data.tar.gz: 33af5651442751fca69b45a64c530ec561085b72cab80a66abe1217e6fb69491b23e5f01ead8a1bc8bebc85b2c8ff2e40f80d3e01b73e49fa1ac7b90b4f97c20
@@ -121,7 +121,6 @@ module Bosh::Cli
121
121
  elsif username && password
122
122
  @credentials = Client::BasicCredentials.new(username, password)
123
123
  end
124
-
125
124
  @credentials
126
125
  end
127
126
 
@@ -145,7 +144,7 @@ module Bosh::Cli
145
144
 
146
145
  def auth_info
147
146
  @auth_info ||= begin
148
- ca_cert = config.ca_cert(target)
147
+ ca_cert = options[:ca_cert] || config.ca_cert(target)
149
148
  director_client = Client::Director.new(target, nil, ca_cert: ca_cert)
150
149
  Client::Uaa::AuthInfo.new(director_client, ENV, ca_cert)
151
150
  end
@@ -66,7 +66,6 @@ module Bosh::Cli::Command
66
66
  usage "target"
67
67
  desc "Choose director to talk to (optionally creating an alias). " +
68
68
  "If no arguments given, show currently targeted director"
69
- option '--ca-cert FILE', String, 'Path to client certificate provided to UAA server'
70
69
  def set_target(director_url = nil, name = nil)
71
70
  if director_url.nil?
72
71
  show_target
@@ -21,11 +21,11 @@ module Bosh::Cli
21
21
  @args = args
22
22
  @options = options.dup
23
23
 
24
- banner = "Usage: bosh [<options>] <command> [<args>]"
24
+ banner = 'Usage: bosh [<options>] <command> [<args>]'
25
25
  @option_parser = OptionParser.new(banner)
26
26
 
27
27
  Config.colorize = nil
28
- if ENV.has_key?("BOSH_COLOR") && ENV["BOSH_COLOR"] == "false"
28
+ if ENV.has_key?('BOSH_COLOR') && ENV['BOSH_COLOR'] == 'false'
29
29
  Config.colorize = false
30
30
  end
31
31
  Config.output ||= STDOUT
@@ -51,7 +51,7 @@ module Bosh::Cli
51
51
  end
52
52
 
53
53
  if command.nil?
54
- err("Unknown command: #{@args.join(" ")}")
54
+ err("Unknown command: #{@args.join(' ')}")
55
55
  end
56
56
 
57
57
  command.runner = self
@@ -104,63 +104,67 @@ module Bosh::Cli
104
104
  def parse_global_options
105
105
  # -v is reserved for verbose but having 'bosh -v' is handy,
106
106
  # hence the little hack
107
- if @args.size == 1 && (@args[0] == "-v" || @args[0] == "--version")
107
+ if @args.size == 1 && (@args[0] == '-v' || @args[0] == '--version')
108
108
  @args = %w(version)
109
109
  return
110
110
  end
111
111
 
112
112
  opts = @option_parser
113
- config_desc = "Override configuration file. Also can be overridden " +
114
- "by BOSH_CONFIG environment variable. Defaults to " +
115
- "$HOME/.bosh_config. Override precedence is command-" +
116
- "line option, then environment variable, then home directory."
117
- opts.on("-c", "--config FILE", config_desc) do |file|
113
+ config_desc = 'Override configuration file. Also can be overridden ' +
114
+ 'by BOSH_CONFIG environment variable. Defaults to ' +
115
+ '$HOME/.bosh_config. Override precedence is command-' +
116
+ 'line option, then environment variable, then home directory.'
117
+ opts.on('-c', '--config FILE', config_desc) do |file|
118
118
  @options[:config] = file
119
119
  end
120
120
 
121
- opts.on("--parallel MAX", "Sets the max number of parallel downloads") do |max|
121
+ opts.on('--parallel MAX', 'Sets the max number of parallel downloads') do |max|
122
122
  Config.max_parallel_downloads = Integer(max)
123
123
  end
124
124
 
125
- opts.on("--[no-]color", "Toggle colorized output") do |v|
125
+ opts.on('--[no-]color', 'Toggle colorized output') do |v|
126
126
  Config.colorize = v
127
127
  end
128
128
 
129
- opts.on("-v", "--verbose", "Show additional output") do
129
+ opts.on('-v', '--verbose', 'Show additional output') do
130
130
  @options[:verbose] = true
131
131
  end
132
- opts.on("-q", "--quiet", "Suppress all output") do
132
+ opts.on('-q', '--quiet', 'Suppress all output') do
133
133
  Config.output = nil
134
134
  end
135
- opts.on("-n", "--non-interactive", "Don't ask for user input") do
135
+ opts.on('-n', '--non-interactive', "Don't ask for user input") do
136
136
  @options[:non_interactive] = true
137
137
  end
138
- opts.on("-N", "--no-track", "Return Task ID and don't track") do
138
+ opts.on('-N', '--no-track', "Return Task ID and don't track") do
139
139
  @options[:no_track] = true
140
140
  end
141
- opts.on("-P", "--poll INTERVAL", "Director task polling interval") do |interval|
141
+ opts.on('-P', '--poll INTERVAL', 'Director task polling interval') do |interval|
142
142
  @options[:poll_interval] = Integer(interval)
143
143
  end
144
- opts.on("-t", "--target URL", "Override target") do |target|
144
+ opts.on('-t', '--target URL', 'Override target') do |target|
145
145
  @options[:target] = target
146
146
  end
147
- opts.on("-u", "--user USER", "Override username") do |user|
147
+ opts.on('-u', '--user USER', 'Override username') do |user|
148
148
  @options[:username] = user
149
149
  end
150
- opts.on("-p", "--password PASSWORD", "Override password") do |pass|
150
+ opts.on('-p', '--password PASSWORD', 'Override password') do |pass|
151
151
  @options[:password] = pass
152
152
  end
153
- opts.on("-d", "--deployment FILE", "Override deployment") do |file|
153
+ opts.on('-d', '--deployment FILE', 'Override deployment') do |file|
154
154
  @options[:deployment] = file
155
155
  end
156
- opts.on("-h", "--help", "here you go") do
156
+ opts.on('-h', '--help', 'here you go') do
157
157
  @args << 'help'
158
158
  end
159
+ opts.on('--ca-cert FILE', 'Override CA certificate') do |file|
160
+ @options[:ca_cert] = file
161
+ end
159
162
 
160
163
  @args = @option_parser.order!(@args)
161
164
  end
162
165
 
163
- def plugins_glob; "bosh/cli/commands/*.rb"; end
166
+ def plugins_glob; 'bosh/cli/commands/*.rb'
167
+ ; end
164
168
 
165
169
  # Discover and load CLI plugins from all available gems
166
170
  # @return [void]
@@ -170,7 +174,7 @@ module Bosh::Cli
170
174
  end
171
175
 
172
176
  def load_local_plugins
173
- Dir.glob(File.join("lib", plugins_glob)).each do |file|
177
+ Dir.glob(File.join('lib', plugins_glob)).each do |file|
174
178
  say("WARNING: loading local plugin: #{file}")
175
179
  require_plugin(file)
176
180
  end
@@ -189,7 +193,7 @@ module Bosh::Cli
189
193
  if Config.commands =~ original_commands
190
194
  say(("File #{plugin_path} has been loaded as plugin but it didn't " +
191
195
  "contain any commands.\nMake sure this plugin is updated to be " +
192
- "compatible with BOSH CLI 1.0.").columnize(80).make_yellow)
196
+ 'compatible with BOSH CLI 1.0.').columnize(80).make_yellow)
193
197
  end
194
198
  end
195
199
  end
@@ -199,9 +203,9 @@ module Bosh::Cli
199
203
  spec.matches_for_glob(plugins_glob)
200
204
  }.flatten.uniq
201
205
  rescue
202
- err("Cannot load plugins, ".make_yellow +
206
+ err('Cannot load plugins, '.make_yellow +
203
207
  "please run `gem update --system' to ".make_yellow +
204
- "update your RubyGems".make_yellow)
208
+ 'update your RubyGems'.make_yellow)
205
209
  end
206
210
 
207
211
  def require_plugin(file)
@@ -225,9 +229,9 @@ module Bosh::Cli
225
229
 
226
230
  def add_shortcuts
227
231
  {
228
- "st" => "status",
229
- "props" => "properties",
230
- "cck" => "cloudcheck"
232
+ 'st' => 'status',
233
+ 'props' => 'properties',
234
+ 'cck' => 'cloudcheck'
231
235
  }.each do |short, long|
232
236
  @parse_tree[short] = @parse_tree[long]
233
237
  end
@@ -262,7 +266,7 @@ module Bosh::Cli
262
266
 
263
267
  while (arg = @args.shift)
264
268
  candidate << arg
265
- resolved = config.resolve_alias(:cli, candidate.join(" "))
269
+ resolved = config.resolve_alias(:cli, candidate.join(' '))
266
270
  if best_match && resolved.nil?
267
271
  @args.unshift(arg)
268
272
  break
@@ -1,5 +1,5 @@
1
1
  module Bosh
2
2
  module Cli
3
- VERSION = '1.3200.0'
3
+ VERSION = '1.3202.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bosh_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3200.0
4
+ version: 1.3202.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - VMware
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.3200.0
19
+ version: 1.3202.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.3200.0
26
+ version: 1.3202.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bosh-template
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.3200.0
33
+ version: 1.3202.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 1.3200.0
40
+ version: 1.3202.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: cf-uaa-lib
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -128,14 +128,14 @@ dependencies:
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: 1.3200.0
131
+ version: 1.3202.0
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: 1.3200.0
138
+ version: 1.3202.0
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: net-ssh
141
141
  requirement: !ruby/object:Gem::Requirement