wavefront-cli 7.1.0 → 7.2.0

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: b1e0ee9608157074b898b31b5c169f432e4feed2d4af31e184b80016675f73cc
4
- data.tar.gz: 4e845f4a56684903f2f1d800ee41cad9a8062a969a8fcb31e839bd51fac3891c
3
+ metadata.gz: 65a2455065fbd4b69b42718f7789e4c01cb5245a0015ea7d2977b96581ad0b83
4
+ data.tar.gz: 2c01e8464589c804271a97dba24a19a62b3f4a1dba9af588216f1d0b911c9ec9
5
5
  SHA512:
6
- metadata.gz: 4635ae95d16aeb2bcb779010fc435945300991f1853ba75488a9e2914b6860129be4257ca13d5765c004efb746ce5f03fa7d686f71bb13ec5fe860f77c4cddbe
7
- data.tar.gz: 501b3425f488c977363b42ec9d362d3e0c56ef8ba0b7cc91a2feb1da8bb2b91d2a1c27ade8cf8d3e5c01f3bde74cf0a582ead9c84f4dc4f0ae6e71c1a3691cc9
6
+ metadata.gz: 392ea65a15b94665c5255da837abcaf3a8b69d38db9b675652c5c824627b3436b4b802174283bcdda6d2f95150cb3fce0a21de2dfcb449c64a0a73259d16357b
7
+ data.tar.gz: f55ffa3998170ee1a3d98f55cdefa9cd27d2f84e39f3c2fcbe3ffb649bcb34eeb96e93e1a486f4edfa030244e4640e3777865eef6f6119380dec7ff273637041
data/HISTORY.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 7.2.0 (2020-08-12)
4
+ * Add `cloudintegration awsid generate` command.
5
+ * Add `cloudintegration awsid delete <external_id>` command.
6
+ * Add `cloudintegration awsid validate <external_id>` command.
7
+ * Require 5.1.x of [the SDK](https://github.com/snltd/wavefront-sdk).
8
+
3
9
  ## 7.1.0 (2020-08-07)
4
10
  * Remove `user` command. (Breaking change.)
5
11
  * Add `account` command.
@@ -22,5 +22,17 @@ module WavefrontCli
22
22
  def do_disable
23
23
  wf.disable(options[:'<id>'])
24
24
  end
25
+
26
+ def do_awsid_generate
27
+ wf.create_aws_external_id
28
+ end
29
+
30
+ def do_awsid_delete
31
+ wf.delete_aws_external_id(options[:'<external_id>'])
32
+ end
33
+
34
+ def do_awsid_confirm
35
+ wf.confirm_aws_external_id(options[:'<external_id>'])
36
+ end
25
37
  end
26
38
  end
@@ -26,7 +26,10 @@ class WavefrontCommandCloudintegration < WavefrontCommandBase
26
26
  "disable #{CMN} <id>",
27
27
  "dump #{CMN}",
28
28
  "import #{CMN} [-uU] <file>",
29
- "search #{CMN} [-al] [-o offset] [-L limit] [-O fields] <condition>..."]
29
+ "search #{CMN} [-al] [-o offset] [-L limit] [-O fields] <condition>...",
30
+ "awsid #{CMN} generate",
31
+ "awsid #{CMN} delete <external_id>",
32
+ "awsid #{CMN} confirm <external_id>"]
30
33
  end
31
34
 
32
35
  def _options
@@ -25,5 +25,17 @@ module WavefrontDisplay
25
25
  def do_disable
26
26
  puts "Disabled '#{options[:'<id>']}'."
27
27
  end
28
+
29
+ def do_awsid_generate
30
+ puts data
31
+ end
32
+
33
+ def do_awsid_delete
34
+ puts "Deleted external ID '#{options[:'<external_id>']}'."
35
+ end
36
+
37
+ def do_awsid_confirm
38
+ puts "'#{data}' is a registered external ID."
39
+ end
28
40
  end
29
41
  end
@@ -31,6 +31,8 @@ module WavefrontCli
31
31
  abort "'#{exception}' is not a valid user group ID."
32
32
  when Wavefront::Exception::InvalidAccountId
33
33
  abort "'#{exception}' is not a valid system or user account ID."
34
+ when Wavefront::Exception::InvalidAwsExternalId
35
+ abort "'#{exception}' is not a valid AWS external ID."
34
36
  when Wavefront::Exception::InvalidRoleId
35
37
  abort "'#{exception}' is not a valid role ID."
36
38
  when Wavefront::Exception::InvalidApiTokenId
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- WF_CLI_VERSION = '7.1.0'
3
+ WF_CLI_VERSION = '7.2.0'
@@ -7,12 +7,11 @@ require_relative '../../lib/wavefront-cli/cloudintegration'
7
7
  # Ensure 'cloudintegration' commands produce the correct API calls.
8
8
  #
9
9
  class CloudIntegrationEndToEndTest < EndToEndTest
10
- include WavefrontCliTest::DeleteUndelete
11
- include WavefrontCliTest::Describe
12
- include WavefrontCliTest::Dump
13
- include WavefrontCliTest::List
14
- # include WavefrontCliTest::Import
15
- include WavefrontCliTest::Search
10
+ # include WavefrontCliTest::DeleteUndelete
11
+ # include WavefrontCliTest::Describe
12
+ # include WavefrontCliTest::Dump
13
+ # include WavefrontCliTest::List
14
+ # include WavefrontCliTest::Search
16
15
 
17
16
  def test_enable
18
17
  assert_repeated_output("Enabled '#{id}'.") do
@@ -46,6 +45,20 @@ class CloudIntegrationEndToEndTest < EndToEndTest
46
45
  'body: null')
47
46
  end
48
47
 
48
+ def test_aws_id_generate
49
+ # assert_repeated_output("Disabled '#{id}'.") do
50
+ # assert_cmd_posts("disable #{id}",
51
+ # "/api/v2/cloudintegration/#{id}/disable")
52
+ # end
53
+
54
+ assert_abort_on_missing_creds('awsid generate')
55
+
56
+ assert_noop('awsid generate',
57
+ 'uri: POST https://default.wavefront.com/api/v2/' \
58
+ 'cloudintegration/awsExternalId',
59
+ 'body: null')
60
+ end
61
+
49
62
  private
50
63
 
51
64
  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.0', '>= 5.0.1'
29
+ gem.add_runtime_dependency 'wavefront-sdk', '~> 5.1'
30
30
 
31
31
  gem.add_development_dependency 'minitest', '~> 5.11', '>= 5.11.0'
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: 7.1.0
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-08-07 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,20 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '5.0'
48
- - - ">="
49
- - !ruby/object:Gem::Version
50
- version: 5.0.1
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: '5.0'
58
- - - ">="
59
- - !ruby/object:Gem::Version
60
- version: 5.0.1
54
+ version: '5.1'
61
55
  - !ruby/object:Gem::Dependency
62
56
  name: minitest
63
57
  requirement: !ruby/object:Gem::Requirement