wavefront-cli 5.1.1 → 7.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +37 -1
  3. data/HISTORY.md +34 -2
  4. data/README.md +2 -4
  5. data/lib/wavefront-cli/account.rb +119 -0
  6. data/lib/wavefront-cli/alert.rb +29 -0
  7. data/lib/wavefront-cli/base.rb +0 -2
  8. data/lib/wavefront-cli/cloudintegration.rb +12 -0
  9. data/lib/wavefront-cli/commands/.rubocop.yml +34 -0
  10. data/lib/wavefront-cli/commands/account.rb +61 -0
  11. data/lib/wavefront-cli/commands/alert.rb +1 -0
  12. data/lib/wavefront-cli/commands/base.rb +1 -1
  13. data/lib/wavefront-cli/commands/cloudintegration.rb +4 -1
  14. data/lib/wavefront-cli/commands/proxy.rb +2 -1
  15. data/lib/wavefront-cli/commands/query.rb +4 -1
  16. data/lib/wavefront-cli/commands/role.rb +44 -0
  17. data/lib/wavefront-cli/commands/spy.rb +0 -5
  18. data/lib/wavefront-cli/commands/usergroup.rb +7 -11
  19. data/lib/wavefront-cli/commands/write.rb +7 -2
  20. data/lib/wavefront-cli/controller.rb +5 -63
  21. data/lib/wavefront-cli/display/account.rb +122 -0
  22. data/lib/wavefront-cli/display/alert.rb +8 -0
  23. data/lib/wavefront-cli/display/base.rb +1 -1
  24. data/lib/wavefront-cli/display/cloudintegration.rb +15 -2
  25. data/lib/wavefront-cli/display/printer/long.rb +2 -1
  26. data/lib/wavefront-cli/display/proxy.rb +16 -0
  27. data/lib/wavefront-cli/display/role.rb +66 -0
  28. data/lib/wavefront-cli/display/settings.rb +1 -0
  29. data/lib/wavefront-cli/display/usergroup.rb +18 -14
  30. data/lib/wavefront-cli/exception_handler.rb +89 -0
  31. data/lib/wavefront-cli/output/hcl/base.rb +1 -1
  32. data/lib/wavefront-cli/output/hcl/dashboard.rb +1 -1
  33. data/lib/wavefront-cli/proxy.rb +5 -0
  34. data/lib/wavefront-cli/query.rb +13 -7
  35. data/lib/wavefront-cli/role.rb +54 -0
  36. data/lib/wavefront-cli/serviceaccount.rb +0 -6
  37. data/lib/wavefront-cli/spy.rb +0 -8
  38. data/lib/wavefront-cli/usergroup.rb +8 -8
  39. data/lib/wavefront-cli/version.rb +1 -1
  40. data/lib/wavefront-cli/write.rb +29 -5
  41. data/spec/.rubocop.yml +34 -0
  42. data/spec/test_mixins/delete.rb +1 -2
  43. data/spec/wavefront-cli/account_spec.rb +303 -0
  44. data/spec/wavefront-cli/alert_spec.rb +28 -0
  45. data/spec/wavefront-cli/cloudintegration_spec.rb +19 -6
  46. data/spec/wavefront-cli/commands/write_spec.rb +1 -1
  47. data/spec/wavefront-cli/event_spec.rb +1 -1
  48. data/spec/wavefront-cli/output/csv/query_spec.rb +1 -1
  49. data/spec/wavefront-cli/output/wavefront/query_spec.rb +2 -2
  50. data/spec/wavefront-cli/query_spec.rb +20 -3
  51. data/spec/wavefront-cli/role_spec.rb +187 -0
  52. data/spec/wavefront-cli/serviceaccount_spec.rb +3 -3
  53. data/spec/wavefront-cli/usergroup_spec.rb +48 -43
  54. data/spec/wavefront-cli/write_spec.rb +44 -0
  55. data/wavefront-cli.gemspec +3 -3
  56. metadata +28 -36
  57. data/lib/wavefront-cli/commands/cluster.rb +0 -44
  58. data/lib/wavefront-cli/commands/user.rb +0 -54
  59. data/lib/wavefront-cli/display/monitoredcluster.rb +0 -14
  60. data/lib/wavefront-cli/display/user.rb +0 -103
  61. data/lib/wavefront-cli/monitoredcluster.rb +0 -50
  62. data/lib/wavefront-cli/user.rb +0 -92
  63. data/spec/wavefront-cli/monitoredcluster_spec.rb +0 -85
  64. data/spec/wavefront-cli/resources/responses/user-list.json +0 -1
  65. data/spec/wavefront-cli/user_spec.rb +0 -311
@@ -209,4 +209,48 @@ class WavefrontCliWriteTest < MiniTest::Test
209
209
  refute WavefrontCli::Write.new(infileformat: 'fma').distribution?
210
210
  refute WavefrontCli::Write.new({}).distribution?
211
211
  end
212
+
213
+ def test_sane_value
214
+ assert_equal(0, wf.sane_value(0))
215
+ assert_equal(0, wf.sane_value(''))
216
+ assert_equal(-10, wf.sane_value('-10.0'))
217
+ assert_equal(10, wf.sane_value(' 10'))
218
+ assert_equal(10, wf.sane_value('\\10'))
219
+ assert_equal(10, wf.sane_value('\10'))
220
+ assert_raises(WavefrontCli::Exception::InvalidValue) { wf.sane_value(nil) }
221
+ assert_raises(WavefrontCli::Exception::InvalidValue) { wf.sane_value({}) }
222
+ assert_raises(WavefrontCli::Exception::InvalidValue) { wf.sane_value([]) }
223
+ end
224
+
225
+ def test_random_value_asymmetric_range
226
+ lower_bound = -5
227
+ upper_bound = 20
228
+
229
+ max = (1..1000).map { wf.random_value(lower_bound, upper_bound) }.max
230
+ min = (1..1000).map { wf.random_value(lower_bound, upper_bound) }.min
231
+
232
+ assert(max <= upper_bound)
233
+ assert(min >= lower_bound)
234
+ refute_equal(max, min)
235
+ end
236
+
237
+ def test_random_value_symmetric_range
238
+ lower_bound = -15
239
+ upper_bound = 15
240
+
241
+ max = (1..1000).map { wf.random_value(lower_bound, upper_bound) }.max
242
+ min = (1..1000).map { wf.random_value(lower_bound, upper_bound) }.min
243
+
244
+ assert(max <= upper_bound)
245
+ assert(min >= lower_bound)
246
+ refute_equal(max, min)
247
+ end
248
+
249
+ def test_random_value_single_value
250
+ lower_bound = 5
251
+ upper_bound = 5
252
+
253
+ assert_equal([5, 5, 5, 5, 5, 5, 5, 5, 5, 5],
254
+ (1..10).map { wf.random_value(lower_bound, upper_bound) })
255
+ end
212
256
  end
@@ -26,11 +26,11 @@ 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', '~> 4.0', '>= 4.0.0'
29
+ gem.add_runtime_dependency 'wavefront-sdk', '~> 5.1'
30
30
 
31
31
  gem.add_development_dependency 'minitest', '~> 5.11', '>= 5.11.0'
32
- gem.add_development_dependency 'rake', '~> 12.0'
33
- gem.add_development_dependency 'rubocop', '~> 0.79'
32
+ gem.add_development_dependency 'rake', '~> 13.0'
33
+ gem.add_development_dependency 'rubocop', '0.87.1'
34
34
  gem.add_development_dependency 'spy', '~> 1.0.0'
35
35
  gem.add_development_dependency 'webmock', '~> 3.7'
36
36
  gem.add_development_dependency 'yard', '~> 0.9.5'
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: 5.1.1
4
+ version: 7.2.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-02-20 00:00:00.000000000 Z
11
+ date: 2020-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: docopt
@@ -44,68 +44,62 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '4.0'
48
- - - ">="
49
- - !ruby/object:Gem::Version
50
- version: 4.0.0
47
+ version: '5.1'
51
48
  type: :runtime
52
49
  prerelease: false
53
50
  version_requirements: !ruby/object:Gem::Requirement
54
51
  requirements:
55
52
  - - "~>"
56
53
  - !ruby/object:Gem::Version
57
- version: '4.0'
58
- - - ">="
59
- - !ruby/object:Gem::Version
60
- version: 4.0.0
54
+ version: '5.1'
61
55
  - !ruby/object:Gem::Dependency
62
56
  name: minitest
63
57
  requirement: !ruby/object:Gem::Requirement
64
58
  requirements:
65
- - - "~>"
66
- - !ruby/object:Gem::Version
67
- version: '5.11'
68
59
  - - ">="
69
60
  - !ruby/object:Gem::Version
70
61
  version: 5.11.0
62
+ - - "~>"
63
+ - !ruby/object:Gem::Version
64
+ version: '5.11'
71
65
  type: :development
72
66
  prerelease: false
73
67
  version_requirements: !ruby/object:Gem::Requirement
74
68
  requirements:
75
- - - "~>"
76
- - !ruby/object:Gem::Version
77
- version: '5.11'
78
69
  - - ">="
79
70
  - !ruby/object:Gem::Version
80
71
  version: 5.11.0
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: '5.11'
81
75
  - !ruby/object:Gem::Dependency
82
76
  name: rake
83
77
  requirement: !ruby/object:Gem::Requirement
84
78
  requirements:
85
79
  - - "~>"
86
80
  - !ruby/object:Gem::Version
87
- version: '12.0'
81
+ version: '13.0'
88
82
  type: :development
89
83
  prerelease: false
90
84
  version_requirements: !ruby/object:Gem::Requirement
91
85
  requirements:
92
86
  - - "~>"
93
87
  - !ruby/object:Gem::Version
94
- version: '12.0'
88
+ version: '13.0'
95
89
  - !ruby/object:Gem::Dependency
96
90
  name: rubocop
97
91
  requirement: !ruby/object:Gem::Requirement
98
92
  requirements:
99
- - - "~>"
93
+ - - '='
100
94
  - !ruby/object:Gem::Version
101
- version: '0.79'
95
+ version: 0.87.1
102
96
  type: :development
103
97
  prerelease: false
104
98
  version_requirements: !ruby/object:Gem::Requirement
105
99
  requirements:
106
- - - "~>"
100
+ - - '='
107
101
  - !ruby/object:Gem::Version
108
- version: '0.79'
102
+ version: 0.87.1
109
103
  - !ruby/object:Gem::Dependency
110
104
  name: spy
111
105
  requirement: !ruby/object:Gem::Requirement
@@ -165,6 +159,7 @@ files:
165
159
  - README.md
166
160
  - Rakefile
167
161
  - bin/wf
162
+ - lib/wavefront-cli/account.rb
168
163
  - lib/wavefront-cli/alert.rb
169
164
  - lib/wavefront-cli/apitoken.rb
170
165
  - lib/wavefront-cli/base.rb
@@ -172,11 +167,11 @@ files:
172
167
  - lib/wavefront-cli/command_mixins/acl.rb
173
168
  - lib/wavefront-cli/command_mixins/tag.rb
174
169
  - lib/wavefront-cli/commands/.rubocop.yml
170
+ - lib/wavefront-cli/commands/account.rb
175
171
  - lib/wavefront-cli/commands/alert.rb
176
172
  - lib/wavefront-cli/commands/apitoken.rb
177
173
  - lib/wavefront-cli/commands/base.rb
178
174
  - lib/wavefront-cli/commands/cloudintegration.rb
179
- - lib/wavefront-cli/commands/cluster.rb
180
175
  - lib/wavefront-cli/commands/config.rb
181
176
  - lib/wavefront-cli/commands/dashboard.rb
182
177
  - lib/wavefront-cli/commands/derivedmetric.rb
@@ -189,13 +184,13 @@ files:
189
184
  - lib/wavefront-cli/commands/notificant.rb
190
185
  - lib/wavefront-cli/commands/proxy.rb
191
186
  - lib/wavefront-cli/commands/query.rb
187
+ - lib/wavefront-cli/commands/role.rb
192
188
  - lib/wavefront-cli/commands/savedsearch.rb
193
189
  - lib/wavefront-cli/commands/serviceaccount.rb
194
190
  - lib/wavefront-cli/commands/settings.rb
195
191
  - lib/wavefront-cli/commands/source.rb
196
192
  - lib/wavefront-cli/commands/spy.rb
197
193
  - lib/wavefront-cli/commands/usage.rb
198
- - lib/wavefront-cli/commands/user.rb
199
194
  - lib/wavefront-cli/commands/usergroup.rb
200
195
  - lib/wavefront-cli/commands/webhook.rb
201
196
  - lib/wavefront-cli/commands/window.rb
@@ -205,6 +200,7 @@ files:
205
200
  - lib/wavefront-cli/controller.rb
206
201
  - lib/wavefront-cli/dashboard.rb
207
202
  - lib/wavefront-cli/derivedmetric.rb
203
+ - lib/wavefront-cli/display/account.rb
208
204
  - lib/wavefront-cli/display/alert.rb
209
205
  - lib/wavefront-cli/display/apitoken.rb
210
206
  - lib/wavefront-cli/display/base.rb
@@ -219,25 +215,25 @@ files:
219
215
  - lib/wavefront-cli/display/maintenancewindow.rb
220
216
  - lib/wavefront-cli/display/message.rb
221
217
  - lib/wavefront-cli/display/metric.rb
222
- - lib/wavefront-cli/display/monitoredcluster.rb
223
218
  - lib/wavefront-cli/display/notificant.rb
224
219
  - lib/wavefront-cli/display/printer/long.rb
225
220
  - lib/wavefront-cli/display/printer/sparkline.rb
226
221
  - lib/wavefront-cli/display/printer/terse.rb
227
222
  - lib/wavefront-cli/display/proxy.rb
228
223
  - lib/wavefront-cli/display/query.rb
224
+ - lib/wavefront-cli/display/role.rb
229
225
  - lib/wavefront-cli/display/savedsearch.rb
230
226
  - lib/wavefront-cli/display/serviceaccount.rb
231
227
  - lib/wavefront-cli/display/settings.rb
232
228
  - lib/wavefront-cli/display/source.rb
233
229
  - lib/wavefront-cli/display/spy.rb
234
230
  - lib/wavefront-cli/display/usage.rb
235
- - lib/wavefront-cli/display/user.rb
236
231
  - lib/wavefront-cli/display/usergroup.rb
237
232
  - lib/wavefront-cli/display/webhook.rb
238
233
  - lib/wavefront-cli/display/write.rb
239
234
  - lib/wavefront-cli/event.rb
240
235
  - lib/wavefront-cli/exception.rb
236
+ - lib/wavefront-cli/exception_handler.rb
241
237
  - lib/wavefront-cli/externallink.rb
242
238
  - lib/wavefront-cli/helpers/load_file.rb
243
239
  - lib/wavefront-cli/ingestionpolicy.rb
@@ -245,7 +241,6 @@ files:
245
241
  - lib/wavefront-cli/maintenancewindow.rb
246
242
  - lib/wavefront-cli/message.rb
247
243
  - lib/wavefront-cli/metric.rb
248
- - lib/wavefront-cli/monitoredcluster.rb
249
244
  - lib/wavefront-cli/notificant.rb
250
245
  - lib/wavefront-cli/opt_handler.rb
251
246
  - lib/wavefront-cli/output/base.rb
@@ -266,6 +261,7 @@ files:
266
261
  - lib/wavefront-cli/output/yaml.rb
267
262
  - lib/wavefront-cli/proxy.rb
268
263
  - lib/wavefront-cli/query.rb
264
+ - lib/wavefront-cli/role.rb
269
265
  - lib/wavefront-cli/savedsearch.rb
270
266
  - lib/wavefront-cli/serviceaccount.rb
271
267
  - lib/wavefront-cli/settings.rb
@@ -275,7 +271,6 @@ files:
275
271
  - lib/wavefront-cli/stdlib/string.rb
276
272
  - lib/wavefront-cli/subcommands/import.rb
277
273
  - lib/wavefront-cli/usage.rb
278
- - lib/wavefront-cli/user.rb
279
274
  - lib/wavefront-cli/usergroup.rb
280
275
  - lib/wavefront-cli/version.rb
281
276
  - lib/wavefront-cli/webhook.rb
@@ -299,6 +294,7 @@ files:
299
294
  - spec/test_mixins/search.rb
300
295
  - spec/test_mixins/set.rb
301
296
  - spec/test_mixins/tag.rb
297
+ - spec/wavefront-cli/account_spec.rb
302
298
  - spec/wavefront-cli/alert_spec.rb
303
299
  - spec/wavefront-cli/apitoken_spec.rb
304
300
  - spec/wavefront-cli/base_spec.rb
@@ -331,7 +327,6 @@ files:
331
327
  - spec/wavefront-cli/maintenancewindow_spec.rb
332
328
  - spec/wavefront-cli/message_spec.rb
333
329
  - spec/wavefront-cli/metric_spec.rb
334
- - spec/wavefront-cli/monitoredcluster_spec.rb
335
330
  - spec/wavefront-cli/notificant_spec.rb
336
331
  - spec/wavefront-cli/opt_handler_spec.rb
337
332
  - spec/wavefront-cli/output/csv/query_spec.rb
@@ -373,7 +368,6 @@ files:
373
368
  - spec/wavefront-cli/resources/responses/query.json
374
369
  - spec/wavefront-cli/resources/responses/savedsearch-list.json
375
370
  - spec/wavefront-cli/resources/responses/usage-export-csv.json
376
- - spec/wavefront-cli/resources/responses/user-list.json
377
371
  - spec/wavefront-cli/resources/responses/user-validate.json
378
372
  - spec/wavefront-cli/resources/responses/usergroup-list.json
379
373
  - spec/wavefront-cli/resources/responses/webhook-list.json
@@ -383,6 +377,7 @@ files:
383
377
  - spec/wavefront-cli/resources/updates/alert.json
384
378
  - spec/wavefront-cli/resources/updates/dashboard.json
385
379
  - spec/wavefront-cli/resources/wavefront.conf
380
+ - spec/wavefront-cli/role_spec.rb
386
381
  - spec/wavefront-cli/savedsearch_spec.rb
387
382
  - spec/wavefront-cli/serviceaccount_spec.rb
388
383
  - spec/wavefront-cli/settings_spec.rb
@@ -391,7 +386,6 @@ files:
391
386
  - spec/wavefront-cli/stdlib/array_spec.rb
392
387
  - spec/wavefront-cli/stdlib/string_spec.rb
393
388
  - spec/wavefront-cli/usage_spec.rb
394
- - spec/wavefront-cli/user_spec.rb
395
389
  - spec/wavefront-cli/usergroup_spec.rb
396
390
  - spec/wavefront-cli/webhook_spec.rb
397
391
  - spec/wavefront-cli/write_spec.rb
@@ -415,8 +409,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
415
409
  - !ruby/object:Gem::Version
416
410
  version: '0'
417
411
  requirements: []
418
- rubyforge_project:
419
- rubygems_version: 2.7.7
412
+ rubygems_version: 3.0.8
420
413
  signing_key:
421
414
  specification_version: 4
422
415
  summary: CLI for Wavefront API v2
@@ -440,6 +433,7 @@ test_files:
440
433
  - spec/test_mixins/search.rb
441
434
  - spec/test_mixins/set.rb
442
435
  - spec/test_mixins/tag.rb
436
+ - spec/wavefront-cli/account_spec.rb
443
437
  - spec/wavefront-cli/alert_spec.rb
444
438
  - spec/wavefront-cli/apitoken_spec.rb
445
439
  - spec/wavefront-cli/base_spec.rb
@@ -472,7 +466,6 @@ test_files:
472
466
  - spec/wavefront-cli/maintenancewindow_spec.rb
473
467
  - spec/wavefront-cli/message_spec.rb
474
468
  - spec/wavefront-cli/metric_spec.rb
475
- - spec/wavefront-cli/monitoredcluster_spec.rb
476
469
  - spec/wavefront-cli/notificant_spec.rb
477
470
  - spec/wavefront-cli/opt_handler_spec.rb
478
471
  - spec/wavefront-cli/output/csv/query_spec.rb
@@ -514,7 +507,6 @@ test_files:
514
507
  - spec/wavefront-cli/resources/responses/query.json
515
508
  - spec/wavefront-cli/resources/responses/savedsearch-list.json
516
509
  - spec/wavefront-cli/resources/responses/usage-export-csv.json
517
- - spec/wavefront-cli/resources/responses/user-list.json
518
510
  - spec/wavefront-cli/resources/responses/user-validate.json
519
511
  - spec/wavefront-cli/resources/responses/usergroup-list.json
520
512
  - spec/wavefront-cli/resources/responses/webhook-list.json
@@ -524,6 +516,7 @@ test_files:
524
516
  - spec/wavefront-cli/resources/updates/alert.json
525
517
  - spec/wavefront-cli/resources/updates/dashboard.json
526
518
  - spec/wavefront-cli/resources/wavefront.conf
519
+ - spec/wavefront-cli/role_spec.rb
527
520
  - spec/wavefront-cli/savedsearch_spec.rb
528
521
  - spec/wavefront-cli/serviceaccount_spec.rb
529
522
  - spec/wavefront-cli/settings_spec.rb
@@ -532,7 +525,6 @@ test_files:
532
525
  - spec/wavefront-cli/stdlib/array_spec.rb
533
526
  - spec/wavefront-cli/stdlib/string_spec.rb
534
527
  - spec/wavefront-cli/usage_spec.rb
535
- - spec/wavefront-cli/user_spec.rb
536
528
  - spec/wavefront-cli/usergroup_spec.rb
537
529
  - spec/wavefront-cli/webhook_spec.rb
538
530
  - spec/wavefront-cli/write_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,54 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative 'base'
4
-
5
- # Define the user command.
6
- #
7
- class WavefrontCommandUser < WavefrontCommandBase
8
- def description
9
- "view and manage Wavefront #{things}"
10
- end
11
-
12
- # delete uses a different string because it accepts multiples.
13
- # Adding ellipsis to <id> causes everything else to expect an
14
- # array.
15
- #
16
- def _commands
17
- ["list #{CMN} [-l] [-O fields]",
18
- "describe #{CMN} <id>",
19
- "create #{CMN} [-e] [-m permission...] [-g group...] <id>",
20
- "invite #{CMN} [-m permission...] [-g group...] <id>",
21
- "delete #{CMN} <user>...",
22
- "dump #{CMN}",
23
- "import #{CMN} [-uU] <file>",
24
- "groups #{CMN} <id>",
25
- "privileges #{CMN} <id>",
26
- "join #{CMN} <id> <group>...",
27
- "leave #{CMN} <id> <group>...",
28
- "grant #{CMN} <privilege> to <id>",
29
- "revoke #{CMN} <privilege> from <id>",
30
- "business functions #{CMN} <id>",
31
- "validate #{CMN} [-l] <user>...",
32
- "search #{CMN} [-al] [-o offset] [-L limit] [-O fields] <condition>..."]
33
- end
34
-
35
- def _options
36
- [common_options,
37
- "-l, --long list #{things} in detail",
38
- "-a, --all list all #{things}",
39
- "-o, --offset=n start from nth #{thing}",
40
- "-L, --limit=COUNT number of #{things} to list",
41
- '-O, --fields=F1,F2,... only show given fields',
42
- "-u, --update update an existing #{thing}",
43
- "-U, --upsert import new or update existing #{thing}",
44
- "-e, --email send e-mail to #{thing} on account creation",
45
- "-m, --permission=STRING give #{thing} this permission",
46
- "-g, --group=STRING add #{thing} to this user group"]
47
- end
48
-
49
- def postscript
50
- 'If your account does not have RBAC enabled, you must grant user ' \
51
- "permissions with '-m'. For a list of permissions, see " \
52
- "'wf usergroup --help'.".fold(TW, 0)
53
- end
54
- 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