morpheus-cli 3.6.23 → 3.6.24

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
  SHA256:
3
- metadata.gz: dcffe77543f6b4ac8d31742aacfa12c021c49fa79140ec9d21447b5a86a4ef21
4
- data.tar.gz: db086e085556d680a02a862333e886e5dfc88c72066197325aca4f2f43fde60a
3
+ metadata.gz: 4d79e052f4783588f17ce7a97a26b04c974fd5ed06c43177fcececad2c9c58b1
4
+ data.tar.gz: 0440f108209b955081e05ec0512296910bd4c364afded4cc816100d6ac4867a0
5
5
  SHA512:
6
- metadata.gz: a6ac7fcd0f8c88e28f51a2d19d9a3b4f20d8ecc2b4f70ccab4dfa4b4337aaa35e93f3a41fa067299fc47f65483edeb574ff08cf4b2af3f6b523fffedf15b7f0c
7
- data.tar.gz: 33cb4330e4edcedbb950f057e9f25cf80c3b52cf592e12ee38e07ae2746b34a82dc8e389e7eb2a585913994c5b345a52fd1923308d2d6ff363232e63e7828bb9
6
+ metadata.gz: 2968f363d3ead95dcd556f47e2769ab7f32d33056eef9e61ace8abd91c9c46e41d8e59274160f3e5885935a7110c401a7634069e8de8aeac041928007fe797f2
7
+ data.tar.gz: aa78c0182612ab3b894b7c8f93805b8e4f029a5bda249bdfeaa9f09f6b12f36393b05be455053e60e67eb3b540b5ef5b4d28d0695c6143516fba8787749e1b3d
@@ -20,7 +20,9 @@ class Morpheus::Cli::CurlCommand
20
20
  opts.on( '-p', '--pretty', "Print result as parsed JSON." ) do
21
21
  options[:pretty] = true
22
22
  end
23
- build_common_options(opts, options, [:remote])
23
+ build_common_options(opts, options, [:dry_run, :remote])
24
+ opts.add_hidden_option('--curl')
25
+ #opts.add_hidden_option('--scrub')
24
26
  opts.footer = <<-EOT
25
27
  This invokes the `curl` command with url "appliance_url/api/$0
26
28
  and includes the authorization header -H "Authorization: Bearer access_token"
@@ -50,7 +52,7 @@ EOT
50
52
  # curry --insecure to curl
51
53
  if options[:insecure] || !Morpheus::RestClient.ssl_verification_enabled?
52
54
  #curl_args.unshift "-k"
53
- curl_args.unshift "--inescure"
55
+ curl_args.unshift "--insecure"
54
56
  end
55
57
 
56
58
  if !@appliance_url
@@ -78,8 +80,17 @@ EOT
78
80
  end
79
81
 
80
82
  # Morpheus::Logging::DarkPrinter.puts "#{curl_cmd}" if Morpheus::Logging.debug?
83
+ curl_cmd_str = options[:scrub] ? Morpheus::Logging.scrub_message(curl_cmd) : curl_cmd
84
+
85
+ if options[:dry_run]
86
+ print cyan
87
+ print "#{cyan}#{curl_cmd_str}#{reset}"
88
+ print "\n\n"
89
+ print reset
90
+ return 0
91
+ end
81
92
  print cyan
82
- print "#{cyan}#{curl_cmd}#{reset}"
93
+ print "#{cyan}#{curl_cmd_str}#{reset}"
83
94
  print "\n\n"
84
95
  print reset
85
96
  # print result
@@ -1075,6 +1075,7 @@ class Morpheus::Cli::Instances
1075
1075
  end
1076
1076
 
1077
1077
  def _list_containers(arg, options)
1078
+ params = {}
1078
1079
  begin
1079
1080
  instance = find_instance_by_name_or_id(arg)
1080
1081
  return 1 if instance.nil?
@@ -1083,7 +1084,7 @@ class Morpheus::Cli::Instances
1083
1084
  print_dry_run @instances_interface.dry.containers(instance['id'], params)
1084
1085
  return
1085
1086
  end
1086
- json_response = @instances_interface.containers(instance['id'])
1087
+ json_response = @instances_interface.containers(instance['id'], params)
1087
1088
  if options[:json]
1088
1089
  puts as_json(json_response, options, "containers")
1089
1090
  return 0
@@ -167,7 +167,7 @@ module Morpheus::Cli::PrintHelper
167
167
  print "\n"
168
168
  puts "#{cyan}#{bold}#{dark}CURL COMMAND#{reset}\n"
169
169
  print format_curl_command(http_method, url, headers, payload, options)
170
- print "\n",reset
170
+ print "\n"
171
171
  return
172
172
  end
173
173
 
@@ -1,6 +1,6 @@
1
1
 
2
2
  module Morpheus
3
3
  module Cli
4
- VERSION = "3.6.23"
4
+ VERSION = "3.6.24"
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: morpheus-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.23
4
+ version: 3.6.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Estes
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2019-03-06 00:00:00.000000000 Z
14
+ date: 2019-03-28 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler