wavefront-cli 8.2.0 → 8.3.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
  SHA256:
3
- metadata.gz: afeb72ce32ce32e70e1f405234608ce5109d039aa6045b89e73e8351d95e459f
4
- data.tar.gz: 06b2ab6daedba6a696b9c63208bfe9465695f224f6fab58c49c9408051f81e3f
3
+ metadata.gz: 9644fb069398c411a71981a9c8953090b235729dbb8d36c707132f852c07b36b
4
+ data.tar.gz: 59c0be42ac3e36bf966297488fae255ea290633098d8f38f67cc5282c4adea64
5
5
  SHA512:
6
- metadata.gz: 75b2159704ea25f5f1dea58b16e9e968b9b3ba17668a6f014a0ff75ce63be91179601a5cc917ab526b281a36d3c4e254ec8dbe0af9ac57f21274a4fbeeb5faab
7
- data.tar.gz: 672954a741cf305255820402b0a62bf9ac8facafb9e5fbf63c633a3355117516253cc50e68247fb019e7b1797f6117062acf32b3e30d012e995a55e37c0bb53f
6
+ metadata.gz: 39e7fd3766761b4b3ce4358fc7355d0b916b55da77db9e06955d5d988cd0cd5e3792b853c8c3726f39840cf5ab6020a26afc29b31561642fe90f4c9795cdca6e
7
+ data.tar.gz: b3d7989e22c02c88593c6ba2630f335978d8a4506cb535eec54ac08776081ddfeab273fe3ae760d77e77b3c82291a943a207a5deb46f3d1f81ed5fea8e36329a
data/HISTORY.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## 8.3.0 (2020-10-31)
4
+ * Add `wf proxy shutdown` command.
5
+
3
6
  ## 8.2.0 (2020-10-06)
4
7
  * Display spans in human-readable query output.
5
8
 
@@ -16,6 +16,7 @@ class WavefrontCommandProxy < WavefrontCommandBase
16
16
  "undelete #{CMN} <id>",
17
17
  "rename #{CMN} <id> <name>",
18
18
  "search #{CMN} [-al] [-o offset] [-L limit] [-O fields] <condition>...",
19
+ "shutdown #{CMN} <id>",
19
20
  "versions #{CMN}"]
20
21
  end
21
22
 
@@ -26,6 +26,10 @@ module WavefrontDisplay
26
26
  multicolumn(:id, :version, :name)
27
27
  end
28
28
 
29
+ def do_shutdown
30
+ puts "Requested shutdown of proxy '#{options[:'<id>']}'."
31
+ end
32
+
29
33
  private
30
34
 
31
35
  def filter_inactive_proxies!
@@ -32,6 +32,10 @@ module WavefrontCli
32
32
  version_info(raw).sort_by { |p| Gem::Version.new(p[:version]) }.reverse
33
33
  end
34
34
 
35
+ def do_shutdown
36
+ wf.shutdown(options[:'<id>'])
37
+ end
38
+
35
39
  def version_info(raw)
36
40
  raw.response.items.map do |i|
37
41
  { id: i.id, version: i.version, name: i.name }
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- WF_CLI_VERSION = '8.2.0'
3
+ WF_CLI_VERSION = '8.3.0'
@@ -36,6 +36,19 @@ class ProxyEndToEndTest < EndToEndTest
36
36
  assert_abort_on_missing_creds("rename #{id} newname")
37
37
  end
38
38
 
39
+ def test_shutdown
40
+ assert_output("Requested shutdown of proxy '#{id}'.\n") do
41
+ assert_cmd_puts("shutdown #{id}", "/api/v2/proxy/#{id}",
42
+ { shutdown: true }.to_json)
43
+ end
44
+
45
+ assert_noop("shutdown #{id}",
46
+ "uri: PUT https://default.wavefront.com/api/v2/proxy/#{id}",
47
+ 'body: {"shutdown":true}')
48
+ assert_invalid_id("shutdown #{invalid_id}")
49
+ assert_abort_on_missing_creds("shutdown #{id}")
50
+ end
51
+
39
52
  private
40
53
 
41
54
  def id
@@ -26,7 +26,7 @@ Gem::Specification.new do |gem|
26
26
 
27
27
  gem.add_runtime_dependency 'docopt', '~> 0.6.0'
28
28
  gem.add_runtime_dependency 'inifile', '~> 3.0'
29
- gem.add_runtime_dependency 'wavefront-sdk', '~> 5.2'
29
+ gem.add_runtime_dependency 'wavefront-sdk', '~> 5.3'
30
30
 
31
31
  gem.add_development_dependency 'minitest', '~> 5.14'
32
32
  gem.add_development_dependency 'rake', '~> 13.0'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wavefront-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.2.0
4
+ version: 8.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Fisher
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-06 00:00:00.000000000 Z
11
+ date: 2020-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: docopt
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '5.2'
47
+ version: '5.3'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '5.2'
54
+ version: '5.3'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: minitest
57
57
  requirement: !ruby/object:Gem::Requirement