wavefront-cli 5.1.2 → 6.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/HISTORY.md +3 -0
- data/README.md +0 -1
- data/lib/wavefront-cli/version.rb +1 -1
- metadata +2 -7
- data/lib/wavefront-cli/commands/cluster.rb +0 -44
- data/lib/wavefront-cli/display/monitoredcluster.rb +0 -14
- data/lib/wavefront-cli/monitoredcluster.rb +0 -50
- data/spec/wavefront-cli/monitoredcluster_spec.rb +0 -85
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99fe3332878acc67af828d3ab48a10f585c6166c6a350357a22d732695ff5b93
|
4
|
+
data.tar.gz: bc3fc9708705d8bf4a8706daf8d24a8dd6882b71d3690843b3a58bb1d3772b65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a56fdece8a0122f64e076cdfa7846b698777a77528810d3ea6dc7d6b24febed750340fa8d717ae939af936f371de13a64fba3b076992e6b69403c75c1f32f841
|
7
|
+
data.tar.gz: 2a3eeb43b52d61315e4ef6bbf6e6d80c0995a625b5d9a7233628011cbd4599dfc3602106e2d1e6bc628c571147d3e330fe3dc4819faa223e46d2943f732049f6
|
data/HISTORY.md
CHANGED
data/README.md
CHANGED
@@ -33,7 +33,6 @@ Commands:
|
|
33
33
|
alert view and manage alerts
|
34
34
|
apitoken view and your own API tokens
|
35
35
|
cloudintegration view and manage cloud integrations
|
36
|
-
cluster view and manage monitored clusters
|
37
36
|
config create and manage local configuration
|
38
37
|
dashboard view and manage dashboards
|
39
38
|
derivedmetric view and manage derived metrics
|
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:
|
4
|
+
version: 6.0.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-
|
11
|
+
date: 2020-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: docopt
|
@@ -176,7 +176,6 @@ files:
|
|
176
176
|
- lib/wavefront-cli/commands/apitoken.rb
|
177
177
|
- lib/wavefront-cli/commands/base.rb
|
178
178
|
- lib/wavefront-cli/commands/cloudintegration.rb
|
179
|
-
- lib/wavefront-cli/commands/cluster.rb
|
180
179
|
- lib/wavefront-cli/commands/config.rb
|
181
180
|
- lib/wavefront-cli/commands/dashboard.rb
|
182
181
|
- lib/wavefront-cli/commands/derivedmetric.rb
|
@@ -219,7 +218,6 @@ files:
|
|
219
218
|
- lib/wavefront-cli/display/maintenancewindow.rb
|
220
219
|
- lib/wavefront-cli/display/message.rb
|
221
220
|
- lib/wavefront-cli/display/metric.rb
|
222
|
-
- lib/wavefront-cli/display/monitoredcluster.rb
|
223
221
|
- lib/wavefront-cli/display/notificant.rb
|
224
222
|
- lib/wavefront-cli/display/printer/long.rb
|
225
223
|
- lib/wavefront-cli/display/printer/sparkline.rb
|
@@ -245,7 +243,6 @@ files:
|
|
245
243
|
- lib/wavefront-cli/maintenancewindow.rb
|
246
244
|
- lib/wavefront-cli/message.rb
|
247
245
|
- lib/wavefront-cli/metric.rb
|
248
|
-
- lib/wavefront-cli/monitoredcluster.rb
|
249
246
|
- lib/wavefront-cli/notificant.rb
|
250
247
|
- lib/wavefront-cli/opt_handler.rb
|
251
248
|
- lib/wavefront-cli/output/base.rb
|
@@ -331,7 +328,6 @@ files:
|
|
331
328
|
- spec/wavefront-cli/maintenancewindow_spec.rb
|
332
329
|
- spec/wavefront-cli/message_spec.rb
|
333
330
|
- spec/wavefront-cli/metric_spec.rb
|
334
|
-
- spec/wavefront-cli/monitoredcluster_spec.rb
|
335
331
|
- spec/wavefront-cli/notificant_spec.rb
|
336
332
|
- spec/wavefront-cli/opt_handler_spec.rb
|
337
333
|
- spec/wavefront-cli/output/csv/query_spec.rb
|
@@ -472,7 +468,6 @@ test_files:
|
|
472
468
|
- spec/wavefront-cli/maintenancewindow_spec.rb
|
473
469
|
- spec/wavefront-cli/message_spec.rb
|
474
470
|
- spec/wavefront-cli/metric_spec.rb
|
475
|
-
- spec/wavefront-cli/monitoredcluster_spec.rb
|
476
471
|
- spec/wavefront-cli/notificant_spec.rb
|
477
472
|
- spec/wavefront-cli/opt_handler_spec.rb
|
478
473
|
- spec/wavefront-cli/output/csv/query_spec.rb
|
@@ -1,44 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative 'base'
|
4
|
-
|
5
|
-
# Define the monitored cluster command.
|
6
|
-
#
|
7
|
-
class WavefrontCommandCluster < WavefrontCommandBase
|
8
|
-
def thing
|
9
|
-
'monitored cluster'
|
10
|
-
end
|
11
|
-
|
12
|
-
def sdk_file
|
13
|
-
'monitoredcluster'
|
14
|
-
end
|
15
|
-
|
16
|
-
def sdk_class
|
17
|
-
'MonitoredCluster'
|
18
|
-
end
|
19
|
-
|
20
|
-
def _commands
|
21
|
-
["list #{CMN} [-al] [-O fields] [-o offset] [-L limit]",
|
22
|
-
"describe #{CMN} <id>",
|
23
|
-
"delete #{CMN} <id>",
|
24
|
-
"create #{CMN} [-v version] <platform> <name> <id>",
|
25
|
-
"dump #{CMN}",
|
26
|
-
"import #{CMN} [-uU] <file>",
|
27
|
-
"set #{CMN} <key=value> <id>",
|
28
|
-
tag_commands,
|
29
|
-
"search #{CMN} [-al] [-o offset] [-L limit] [-O fields] <condition>...",
|
30
|
-
"merge #{CMN} <id_to> <id_from>"]
|
31
|
-
end
|
32
|
-
|
33
|
-
def _options
|
34
|
-
[common_options,
|
35
|
-
"-l, --long list #{things} in detail",
|
36
|
-
"-a, --all list all #{things}",
|
37
|
-
"-o, --offset=n start from nth #{thing}",
|
38
|
-
'-O, --fields=F1,F2,... only show given fields',
|
39
|
-
"-L, --limit=COUNT number of #{things} to list",
|
40
|
-
"-u, --update update an existing #{thing}",
|
41
|
-
"-U, --upsert import new or update existing #{thing}",
|
42
|
-
"-v, --version=VERSION version of #{thing}"]
|
43
|
-
end
|
44
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative 'base'
|
4
|
-
|
5
|
-
module WavefrontDisplay
|
6
|
-
#
|
7
|
-
# Format human-readable output for monitored clusters.
|
8
|
-
#
|
9
|
-
class MonitoredCluster < Base
|
10
|
-
def do_list_brief
|
11
|
-
multicolumn(:id, :platform, :name)
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
@@ -1,50 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative 'base'
|
4
|
-
require_relative 'command_mixins/tag'
|
5
|
-
|
6
|
-
module WavefrontCli
|
7
|
-
#
|
8
|
-
# CLI coverage for the v2 'maintenancewindow' API.
|
9
|
-
#
|
10
|
-
class MonitoredCluster < WavefrontCli::Base
|
11
|
-
include WavefrontCli::Mixin::Tag
|
12
|
-
|
13
|
-
def do_create
|
14
|
-
body = { version: options[:version],
|
15
|
-
name: options[:'<name>'],
|
16
|
-
platform: options[:'<platform>'],
|
17
|
-
id: options[:'<id>'],
|
18
|
-
additionalTags: {},
|
19
|
-
tags: [] }
|
20
|
-
wf.create(body)
|
21
|
-
end
|
22
|
-
|
23
|
-
def do_merge
|
24
|
-
wf.merge(options[:'<id_to>'], options[:'<id_from>'])
|
25
|
-
end
|
26
|
-
|
27
|
-
def validator_exception
|
28
|
-
Wavefront::Exception::InvalidMonitoredClusterId
|
29
|
-
end
|
30
|
-
|
31
|
-
def descriptive_name
|
32
|
-
'monitored cluster'
|
33
|
-
end
|
34
|
-
|
35
|
-
def extra_validation
|
36
|
-
return unless options[:merge]
|
37
|
-
|
38
|
-
validate_merge_id(options[:'<id_to>'])
|
39
|
-
validate_merge_id(options[:'<id_from>'])
|
40
|
-
end
|
41
|
-
|
42
|
-
private
|
43
|
-
|
44
|
-
def validate_merge_id(id)
|
45
|
-
wf_monitoredcluster_id?(id)
|
46
|
-
rescue Wavefront::Exception::InvalidMonitoredClusterId
|
47
|
-
abort "'#{id}' is not a valid cluster ID."
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
@@ -1,85 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
require_relative '../support/command_base'
|
5
|
-
require_relative '../test_mixins/tag'
|
6
|
-
require_relative '../../lib/wavefront-cli/monitoredcluster'
|
7
|
-
|
8
|
-
# Ensure 'cluster' commands produce the correct API calls.
|
9
|
-
#
|
10
|
-
class MonitoredClusterEndToEndTest < EndToEndTest
|
11
|
-
include WavefrontCliTest::Delete
|
12
|
-
include WavefrontCliTest::Describe
|
13
|
-
include WavefrontCliTest::List
|
14
|
-
include WavefrontCliTest::Search
|
15
|
-
include WavefrontCliTest::Tag
|
16
|
-
|
17
|
-
def test_create
|
18
|
-
quietly do
|
19
|
-
assert_cmd_posts("create EKS cluster #{id}",
|
20
|
-
'/api/v2/monitoredcluster',
|
21
|
-
version: nil,
|
22
|
-
name: 'cluster',
|
23
|
-
platform: 'EKS',
|
24
|
-
id: 'test-cluster',
|
25
|
-
additionalTags: {},
|
26
|
-
tags: [])
|
27
|
-
end
|
28
|
-
|
29
|
-
assert_abort_on_missing_creds("create EKS cluster #{id}")
|
30
|
-
assert_noop("create EKS -v 1.2 cluster #{id}",
|
31
|
-
'uri: POST https://default.wavefront.com/api/v2/monitoredcluster',
|
32
|
-
"body: #{ { version: '1.2',
|
33
|
-
name: 'cluster',
|
34
|
-
platform: 'EKS',
|
35
|
-
id: 'test-cluster',
|
36
|
-
additionalTags: {},
|
37
|
-
tags: [] }.to_json}")
|
38
|
-
end
|
39
|
-
|
40
|
-
def test_merge
|
41
|
-
quietly do
|
42
|
-
assert_cmd_puts(
|
43
|
-
"merge #{id} #{id2}", "/api/v2/monitoredcluster/merge/#{id}/#{id2}",
|
44
|
-
{}
|
45
|
-
)
|
46
|
-
end
|
47
|
-
|
48
|
-
assert_noop("merge #{id} #{id2}",
|
49
|
-
'uri: PUT https://default.wavefront.com/api/v2/' \
|
50
|
-
"monitoredcluster/merge/#{id}/#{id2}",
|
51
|
-
'body: null')
|
52
|
-
assert_invalid_id("merge #{invalid_id} #{id2} -D")
|
53
|
-
assert_abort_on_missing_creds("merge #{id} #{id2}")
|
54
|
-
end
|
55
|
-
|
56
|
-
private
|
57
|
-
|
58
|
-
def id
|
59
|
-
'test-cluster'
|
60
|
-
end
|
61
|
-
|
62
|
-
def id2
|
63
|
-
'other-cluster'
|
64
|
-
end
|
65
|
-
|
66
|
-
def invalid_id
|
67
|
-
'!__BAD__!'
|
68
|
-
end
|
69
|
-
|
70
|
-
def cmd_word
|
71
|
-
'cluster'
|
72
|
-
end
|
73
|
-
|
74
|
-
def api_path
|
75
|
-
'monitoredcluster'
|
76
|
-
end
|
77
|
-
|
78
|
-
def sdk_class_name
|
79
|
-
'MonitoredCluster'
|
80
|
-
end
|
81
|
-
|
82
|
-
def friendly_name
|
83
|
-
'monitored cluster'
|
84
|
-
end
|
85
|
-
end
|