aptible-cli 0.24.9 → 0.25.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: 6eb51d67be8b4afcf1d4c56bcf323b44b0f866cb7a0d6de8825cd4bf6c59e152
4
- data.tar.gz: 4f79b328a9db799239eb1f9390dd8ff99525351b9003b687c3eefce086333bbb
3
+ metadata.gz: 5c07b217cf8ee2a23f5823638e205e780d43b3adf57397a4ecb01c8aff5998b7
4
+ data.tar.gz: aefbe672ac77da98c9fd445b6ee0ffbbc044f531a97f36bc6d7bf48db46a1b4c
5
5
  SHA512:
6
- metadata.gz: e8c872499c77e46408a857a590995f88e4444b1c70c2965ea2737209055fdfdf68f460757b82f9699188fda5e7c178319f575a7f7c9bb29e009b8d5c1848e05a
7
- data.tar.gz: 8f0a4c1652ad64dd978ebd56bb768f1404d32e44db93b6072a204202b8000605116d9a8109c922e05cbeae2be6f2ee584ac6a46792c4989e59303a9d0e65dadb
6
+ metadata.gz: 3710b7014df38552ebce0b5780921be9020227a965fd6d67e0a5718f1ac223fde476f59c3a7e3289c268a7cf24d96c8057fe87b553b30941102028106e00d54c
7
+ data.tar.gz: c2122ad6901292782834cdaedcda8b3b2638a0bcac815dec175e9fa4704282955953fa94b02f6c322daf9e47584eb944416071d907ffcd301b65d7b4f08470c8
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- aptible-cli (0.24.9)
4
+ aptible-cli (0.25.0)
5
5
  activesupport (>= 4.0, < 6.0)
6
6
  aptible-api (~> 1.8.0)
7
7
  aptible-auth (~> 1.2.5)
data/README.md CHANGED
@@ -81,6 +81,7 @@ Commands:
81
81
  aptible log_drain:create:https HANDLE --url URL --environment ENVIRONMENT [--drain-apps|--no-drain-apps] [--drain-databases|--no-drain-databases] [--drain-ephemeral-sessions|--no-drain-ephemeral-sessions] [--drain_proxies|--no-drain-proxies] # Create a HTTPS Drain
82
82
  aptible log_drain:create:logdna HANDLE --url LOGDNA_URL --environment ENVIRONMENT [--drain-apps|--no-drain-apps] [--drain-databases|--no-drain-databases] [--drain-ephemeral-sessions|--no-drain-ephemeral-sessions] [--drain_proxies|--no-drain-proxies] # Create a LogDNA/Mezmo Log Drain. By default, App, Database, Ephemeral Session, and Proxy logs will be sent to your chosen destination.
83
83
  aptible log_drain:create:papertrail HANDLE --host PAPERTRAIL_HOST --port PAPERTRAIL_PORT --environment ENVIRONMENT [--drain-apps|--no-drain-apps] [--drain-databases|--no-drain-databases] [--drain-ephemeral-sessions|--no-drain-ephemeral-sessions] [--drain_proxies|--no-drain-proxies] # Create a Papertrail Log Drain. By default, App, Database, Ephemeral Session, and Proxy logs will be sent to your chosen destination.
84
+ aptible log_drain:create:solarwinds HANDLE --host SWO_HOSTNAME --token SWO_TOKEN --environment ENVIRONMENT [--drain-apps|--no-drain-apps] [--drain-databases|--no-drain-databases] [--drain-ephemeral-sessions|--no-drain-ephemeral-sessions] [--drain_proxies|--no-drain-proxies] # Create a SolarWinds Log Drain. By default, App, Database, Ephemeral Session, and Proxy logs will be sent to your chosen destination.
84
85
  aptible log_drain:create:sumologic HANDLE --url SUMOLOGIC_URL --environment ENVIRONMENT [--drain-apps|--no-drain-apps] [--drain-databases|--no-drain-databases] [--drain-ephemeral-sessions|--no-drain-ephemeral-sessions] [--drain_proxies|--no-drain-proxies] # Create a Sumologic Drain. By default, App, Database, Ephemeral Session, and Proxy logs will be sent to your chosen destination.
85
86
  aptible log_drain:create:syslog HANDLE --host SYSLOG_HOST --port SYSLOG_PORT [--token TOKEN] --environment ENVIRONMENT [--drain-apps|--no-drain-apps] [--drain-databases|--no-drain-databases] [--drain-ephemeral-sessions|--no-drain-ephemeral-sessions] [--drain_proxies|--no-drain-proxies] # Create a Syslog Log Drain. By default, App, Database, Ephemeral Session, and Proxy logs will be sent to your chosen destination.
86
87
  aptible log_drain:deprovision HANDLE --environment ENVIRONMENT # Deprovisions a log drain
@@ -12,7 +12,6 @@ module Aptible
12
12
  ports
13
13
  port
14
14
  alb
15
- shared
16
15
  ).freeze
17
16
 
18
17
  def initialize(&block)
@@ -58,11 +57,18 @@ module Aptible
58
57
  option(
59
58
  :load_balancing_algorithm_type,
60
59
  type: :string,
61
- desc: 'The load balancing algorithm for this Endpoint.' \
62
- 'valid options are round_robin, ' \
60
+ desc: 'The load balancing algorithm for this Endpoint. ' \
61
+ 'Valid options are round_robin, ' \
63
62
  'least_outstanding_requests, and ' \
64
63
  'weighted_random'
65
64
  )
65
+
66
+ option(
67
+ :shared,
68
+ type: :boolean,
69
+ desc: "Share this Endpoint's load balancer with other " \
70
+ 'Endpoints'
71
+ )
66
72
  end
67
73
  end
68
74
 
@@ -123,15 +129,6 @@ module Aptible
123
129
  'on this Endpoint'
124
130
  )
125
131
  end
126
-
127
- if builder.shared?
128
- option(
129
- :shared,
130
- type: :boolean,
131
- desc: "Share this Endpoint's load balancer with other " \
132
- 'Endpoints'
133
- )
134
- end
135
132
  end
136
133
  end
137
134
 
@@ -203,11 +200,7 @@ module Aptible
203
200
  params[:load_balancing_algorithm_type] = lba_type
204
201
  end
205
202
 
206
- if shared?
207
- params[:shared] = options.delete(:shared) do
208
- create? ? false : nil
209
- end
210
- end
203
+ params[:shared] = options.delete(:shared)
211
204
  end
212
205
 
213
206
  options.delete(:environment)
@@ -160,7 +160,6 @@ module Aptible
160
160
  port!
161
161
  tls!
162
162
  alb!
163
- shared!
164
163
  end
165
164
 
166
165
  desc 'endpoints:https:create [--app APP] SERVICE',
@@ -180,7 +179,6 @@ module Aptible
180
179
  port!
181
180
  tls!
182
181
  alb!
183
- shared!
184
182
  end
185
183
 
186
184
  desc 'endpoints:https:modify [--app APP] ENDPOINT_HOSTNAME',
@@ -152,6 +152,33 @@ module Aptible
152
152
  create_syslog_based_log_drain(handle, options)
153
153
  end
154
154
 
155
+ desc 'log_drain:create:solarwinds HANDLE ' \
156
+ '--host SWO_HOSTNAME --token SWO_TOKEN ' \
157
+ + drain_flags,
158
+ 'Create a SolarWinds Log Drain. By default, App, Database, ' \
159
+ + 'Ephemeral Session, and Proxy logs will be sent ' \
160
+ + 'to your chosen destination.'
161
+ option :host, type: :string
162
+ option :token, type: :string
163
+ drain_options
164
+ define_method 'log_drain:create:solarwinds' do |handle|
165
+ telemetry(__method__, options.merge(handle: handle))
166
+
167
+ account = ensure_environment(options)
168
+
169
+ opts = {
170
+ handle: handle,
171
+ drain_host: options[:host],
172
+ logging_token: options[:token],
173
+ drain_apps: options[:drain_apps],
174
+ drain_databases: options[:drain_databases],
175
+ drain_ephemeral_sessions: options[:drain_ephemeral_sessions],
176
+ drain_proxies: options[:drain_proxies],
177
+ drain_type: :solarwinds
178
+ }
179
+ create_log_drain(account, opts)
180
+ end
181
+
155
182
  desc 'log_drain:create:syslog HANDLE ' \
156
183
  '--host SYSLOG_HOST --port SYSLOG_PORT ' \
157
184
  '[--token TOKEN] ' \
@@ -1,5 +1,5 @@
1
1
  module Aptible
2
2
  module CLI
3
- VERSION = '0.24.9'.freeze
3
+ VERSION = '0.25.0'.freeze
4
4
  end
5
5
  end
@@ -195,6 +195,30 @@ describe Aptible::CLI::Agent do
195
195
  subject.send('log_drain:create:syslog', 'test-syslog')
196
196
  end
197
197
  end
198
+
199
+ describe 'solarwinds' do
200
+ it 'creates a new Solarwinds log drain' do
201
+ opts = {
202
+ handle: 'test-solarwinds',
203
+ drain_host: 'some-solarwinds.domain.com',
204
+ logging_token: 'test-token',
205
+ drain_apps: nil,
206
+ drain_databases: nil,
207
+ drain_ephemeral_sessions: nil,
208
+ drain_proxies: nil,
209
+ drain_type: :solarwinds
210
+ }
211
+
212
+ expect_provision_log_drain(opts)
213
+
214
+ subject.options = {
215
+ environment: account.handle,
216
+ host: 'some-solarwinds.domain.com',
217
+ token: 'test-token'
218
+ }
219
+ subject.send('log_drain:create:solarwinds', 'test-solarwinds')
220
+ end
221
+ end
198
222
  end
199
223
 
200
224
  describe '#log_drain:deprovision' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aptible-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.24.9
4
+ version: 0.25.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frank Macreery
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-08-11 00:00:00.000000000 Z
11
+ date: 2025-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport