droplet_kit 3.5.1 → 3.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -2
- data/lib/droplet_kit.rb +3 -0
- data/lib/droplet_kit/mappings/database_user_reset_auth_mapping.rb +15 -0
- data/lib/droplet_kit/mappings/kubernetes_node_pool_mapping.rb +2 -0
- data/lib/droplet_kit/models/database_user.rb +1 -1
- data/lib/droplet_kit/models/database_user_mysql_settings.rb +5 -0
- data/lib/droplet_kit/models/database_user_reset_auth.rb +5 -0
- data/lib/droplet_kit/models/kubernetes_node_pool.rb +1 -1
- data/lib/droplet_kit/resources/database_resource.rb +6 -0
- data/lib/droplet_kit/version.rb +1 -1
- metadata +15 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dee58ed06868cc867d3431512911e59bd57501abe35bbc999c7516b07493e465
|
4
|
+
data.tar.gz: 38b1de8ee101b3f4f58cc888f04bce1289e825d65746fcdfa675ba5419bda592
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0928508dd6659ed228316d6612ca60e95f5d8e93a81bf8563b82bdb4815ae224b83b200aafb6894b7aa0a497d96a1c8b3c5cddd61c12d4eddc6fcd2041370238'
|
7
|
+
data.tar.gz: 8ae5f398a9ba954dd111c825edb148a10fa8bbb008d457c3faeef309ba6ef95a8d1ba19465c5ed4869238ebca2eb852a3089d25b4c87c32c60b591e2d58d0719
|
data/README.md
CHANGED
@@ -166,6 +166,7 @@ Actions supported:
|
|
166
166
|
* `client.databases.create_database_user(database_user, id: 'id')`
|
167
167
|
* `client.databases.find_database_user(id: 'id', name: 'name')`
|
168
168
|
* `client.databases.list_database_users(id: 'id')`
|
169
|
+
* `client.databases.reset_database_user_auth(reset_auth, id: 'id', name: 'name')`
|
169
170
|
* `client.databases.delete_database_user(id: 'id', name: 'name')`
|
170
171
|
* `client.databases.create_connection_pool(database_connection_pool, id: 'id')`
|
171
172
|
* `client.databases.find_connection_pool(id: 'id', name: 'name')`
|
@@ -342,7 +343,7 @@ Actions supported:
|
|
342
343
|
|
343
344
|
## Image Action Resource
|
344
345
|
|
345
|
-
```
|
346
|
+
```ruby
|
346
347
|
client = DropletKit::Client.new(access_token: 'TOKEN')
|
347
348
|
client.image_actions #=> DropletKit::ImageActionResource
|
348
349
|
```
|
@@ -356,7 +357,7 @@ Image Actions Supported:
|
|
356
357
|
|
357
358
|
## Kubernetes Resource
|
358
359
|
|
359
|
-
```
|
360
|
+
```ruby
|
360
361
|
client = DropletKit::Client.new(access_token: 'TOKEN')
|
361
362
|
client.kubernetes_clusters #=> DropletKit::KubernetesClusterResource
|
362
363
|
```
|
data/lib/droplet_kit.rb
CHANGED
@@ -43,6 +43,8 @@ module DropletKit
|
|
43
43
|
autoload :DatabaseReplica, 'droplet_kit/models/database_replica'
|
44
44
|
autoload :DatabaseSQLMode, 'droplet_kit/models/database_sql_mode'
|
45
45
|
autoload :DatabaseUser, 'droplet_kit/models/database_user'
|
46
|
+
autoload :DatabaseUserResetAuth, 'droplet_kit/models/database_user_reset_auth'
|
47
|
+
autoload :DatabaseUserMySQLSettings, 'droplet_kit/models/database_user_mysql_settings'
|
46
48
|
autoload :LoadBalancer, 'droplet_kit/models/load_balancer'
|
47
49
|
autoload :StickySession, 'droplet_kit/models/sticky_session'
|
48
50
|
autoload :HealthCheck, 'droplet_kit/models/health_check'
|
@@ -130,6 +132,7 @@ module DropletKit
|
|
130
132
|
autoload :DatabaseReplicaMapping, 'droplet_kit/mappings/database_replica_mapping'
|
131
133
|
autoload :DatabaseSQLModeMapping, 'droplet_kit/mappings/database_sql_mode_mapping'
|
132
134
|
autoload :DatabaseUserMapping, 'droplet_kit/mappings/database_user_mapping'
|
135
|
+
autoload :DatabaseUserResetAuthMapping, 'droplet_kit/mappings/database_user_reset_auth_mapping'
|
133
136
|
autoload :LoadBalancerMapping, 'droplet_kit/mappings/load_balancer_mapping'
|
134
137
|
autoload :StickySessionMapping, 'droplet_kit/mappings/sticky_session_mapping'
|
135
138
|
autoload :HealthCheckMapping, 'droplet_kit/mappings/health_check_mapping'
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module DropletKit
|
2
|
+
class DatabaseUserResetAuthMapping
|
3
|
+
include Kartograph::DSL
|
4
|
+
|
5
|
+
kartograph do
|
6
|
+
mapping DatabaseUserResetAuth
|
7
|
+
scoped :create do
|
8
|
+
property :mysql_settings do
|
9
|
+
mapping DatabaseUserMySQLSettings
|
10
|
+
property :auth_plugin, scopes: [:create]
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -10,6 +10,7 @@ module DropletKit
|
|
10
10
|
property :size, scopes: [:read]
|
11
11
|
property :count, scopes: [:read]
|
12
12
|
property :tags, scopes: [:read]
|
13
|
+
property :labels, scopes: [:read]
|
13
14
|
property :auto_scale, scopes: [:read]
|
14
15
|
property :min_nodes, scopes: [:read]
|
15
16
|
property :max_nodes, scopes: [:read]
|
@@ -21,6 +22,7 @@ module DropletKit
|
|
21
22
|
property :size, scopes: [:create, :update]
|
22
23
|
property :count, scopes: [:create, :update]
|
23
24
|
property :tags, scopes: [:create, :update]
|
25
|
+
property :labels, scopes: [:create, :update]
|
24
26
|
property :auto_scale, scopes: [:create, :update]
|
25
27
|
property :min_nodes, scopes: [:create, :update]
|
26
28
|
property :max_nodes, scopes: [:create, :update]
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module DropletKit
|
2
2
|
class KubernetesNodePool < BaseModel
|
3
|
-
[:id, :name, :size, :count, :tags, :nodes, :auto_scale, :min_nodes, :max_nodes].each do |key|
|
3
|
+
[:id, :name, :size, :count, :tags, :labels, :nodes, :auto_scale, :min_nodes, :max_nodes].each do |key|
|
4
4
|
attribute(key)
|
5
5
|
end
|
6
6
|
end
|
@@ -116,6 +116,12 @@ module DropletKit
|
|
116
116
|
handler(200) { |response| DatabaseUserMapping.extract_collection(response.body, :read) }
|
117
117
|
end
|
118
118
|
|
119
|
+
action :reset_database_user_auth, 'POST /v2/databases/:id/users/:name/reset_auth' do
|
120
|
+
body { |object| DatabaseUserResetAuthMapping.representation_for(:create, object) }
|
121
|
+
handler(200) { |response| DatabaseUserMapping.extract_single(response.body, :read) }
|
122
|
+
handler(422) { |response| ErrorMapping.fail_with(FailedUpdate, response.body) }
|
123
|
+
end
|
124
|
+
|
119
125
|
action :delete_database_user, 'DELETE /v2/databases/:id/users/:name' do
|
120
126
|
handler(204) { |response| true }
|
121
127
|
end
|
data/lib/droplet_kit/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: droplet_kit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Digital Ocean API/CLI team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-04-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: virtus
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 1.
|
75
|
+
version: 2.1.4
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 1.
|
82
|
+
version: 2.1.4
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rake
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 3.
|
103
|
+
version: 3.9.0
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 3.
|
110
|
+
version: 3.9.0
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: rb-readline
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,17 +128,17 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version:
|
131
|
+
version: 3.8.0
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version:
|
138
|
+
version: 3.8.0
|
139
139
|
description: Droplet Kit is the official Ruby library for DigitalOcean's API
|
140
140
|
email:
|
141
|
-
-
|
141
|
+
- devex-api-engineering@digitalocean.com
|
142
142
|
executables: []
|
143
143
|
extensions: []
|
144
144
|
extra_rdoc_files: []
|
@@ -165,6 +165,7 @@ files:
|
|
165
165
|
- lib/droplet_kit/mappings/database_replica_mapping.rb
|
166
166
|
- lib/droplet_kit/mappings/database_sql_mode_mapping.rb
|
167
167
|
- lib/droplet_kit/mappings/database_user_mapping.rb
|
168
|
+
- lib/droplet_kit/mappings/database_user_reset_auth_mapping.rb
|
168
169
|
- lib/droplet_kit/mappings/domain_mapping.rb
|
169
170
|
- lib/droplet_kit/mappings/domain_record_mapping.rb
|
170
171
|
- lib/droplet_kit/mappings/droplet_mapping.rb
|
@@ -220,6 +221,8 @@ files:
|
|
220
221
|
- lib/droplet_kit/models/database_replica.rb
|
221
222
|
- lib/droplet_kit/models/database_sql_mode.rb
|
222
223
|
- lib/droplet_kit/models/database_user.rb
|
224
|
+
- lib/droplet_kit/models/database_user_mysql_settings.rb
|
225
|
+
- lib/droplet_kit/models/database_user_reset_auth.rb
|
223
226
|
- lib/droplet_kit/models/domain.rb
|
224
227
|
- lib/droplet_kit/models/domain_record.rb
|
225
228
|
- lib/droplet_kit/models/droplet.rb
|
@@ -303,14 +306,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
303
306
|
requirements:
|
304
307
|
- - ">="
|
305
308
|
- !ruby/object:Gem::Version
|
306
|
-
version: 2.
|
309
|
+
version: 2.4.0
|
307
310
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
308
311
|
requirements:
|
309
312
|
- - ">="
|
310
313
|
- !ruby/object:Gem::Version
|
311
314
|
version: '0'
|
312
315
|
requirements: []
|
313
|
-
rubygems_version: 3.
|
316
|
+
rubygems_version: 3.0.3
|
314
317
|
signing_key:
|
315
318
|
specification_version: 4
|
316
319
|
summary: Droplet Kit is the official Ruby library for DigitalOcean's API
|