droplet_kit 3.14.0 → 3.15.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: 43d8d9788a8a3bd619b79d2c07b6eaab10f3bdf8ed6ee47e991d74f7723b0607
4
- data.tar.gz: 5e9b8b58b1114534914c7bcc279b6cc8acb4aa8c3d2affa40f9c56eccbe79615
3
+ metadata.gz: b7e1697abc6f7381a7ecc9d1c19c4e5cccd5844201759fe4624f87fed81164d3
4
+ data.tar.gz: 3768790a72256c983b85dd06c2031451899a3adb02b40c29a36a68942224be44
5
5
  SHA512:
6
- metadata.gz: ca07fe070541c8750a090a3c0084754126fef41b8984338858611f1e9e3a4d00b953e70d23e84f48000e0b61a8b0bc8b124f8886ad8958964ef40104c950ccdd
7
- data.tar.gz: 8fd957e58eed544ccbc6e4cfcb9af91e9b5683be1cae2bcb9cdee42cb4299a85e83865fb5aca87f3dc428882197c1c690e5afc44741252986a40cfef43f90c31
6
+ metadata.gz: 260ab8b6c9383854f8746b4247e7cc341f35ca8cd83ebec0ebda0c10fd64e9584aade02b0332c5efe6a24e70c3ffed7c8a27740f8680959a460e2af2031c83e0
7
+ data.tar.gz: 41667e255308d920906ecc83e92afcfb3273959dba81ddd73d1d2d631362f30946228bf530cc2330160a942b284ebf5a126cf00c195146b47f28adda52fdb8c9
@@ -38,6 +38,7 @@ module DropletKit
38
38
  property :ssh_keys, scopes: [:create]
39
39
  property :backups, scopes: [:create]
40
40
  property :monitoring, scopes: [:create]
41
+ property :with_droplet_agent, scopes: [:create]
41
42
  property :ipv6, scopes: [:create]
42
43
  property :user_data, scopes: [:create]
43
44
  property :private_networking, scopes: [:create]
@@ -18,6 +18,7 @@ module DropletKit
18
18
  property :maintenance_policy, scopes: [:read, :update, :create]
19
19
  property :node_pools, scopes: [:read, :create]
20
20
  property :vpc_uuid, scopes: [:read, :create]
21
+ property :ha, scopes: [:read, :create]
21
22
  end
22
23
  end
23
24
  end
@@ -5,11 +5,12 @@ module DropletKit
5
5
  mapping KubernetesOptions
6
6
  root_key singular: 'options', scopes: [:read]
7
7
 
8
- Version = Struct.new(:slug, :kubernetes_version)
8
+ Version = Struct.new(:slug, :kubernetes_version, :supported_features)
9
9
  property :versions, plural: true, scopes: [:read] do
10
10
  mapping Version
11
11
  property :slug, scopes: [:read]
12
12
  property :kubernetes_version, scopes: [:read]
13
+ property :supported_features, scopes: [:read]
13
14
  end
14
15
 
15
16
  Region = Struct.new(:name, :slug)
@@ -13,6 +13,7 @@ module DropletKit
13
13
  attribute :ssh_keys
14
14
  attribute :backups
15
15
  attribute :monitoring
16
+ attribute :with_droplet_agent
16
17
  attribute :size
17
18
  attribute :ipv6
18
19
  attribute :user_data
@@ -1,6 +1,6 @@
1
1
  module DropletKit
2
2
  class KubernetesCluster < BaseModel
3
- [:id, :name, :region, :version, :auto_upgrade, :cluster_subnet, :service_subnet, :ipv4, :endpoint, :tags, :maintenance_policy, :node_pools, :vpc_uuid].each do |key|
3
+ [:id, :name, :region, :version, :auto_upgrade, :cluster_subnet, :service_subnet, :ipv4, :endpoint, :tags, :maintenance_policy, :node_pools, :vpc_uuid, :ha].each do |key|
4
4
  attribute(key)
5
5
  end
6
6
  end
@@ -13,7 +13,20 @@ module DropletKit
13
13
  end
14
14
 
15
15
  action :create, 'POST /v2/kubernetes/clusters' do
16
- body { |object| KubernetesClusterMapping.representation_for(:create, object) }
16
+ body do |object|
17
+ # This ensures that both a hash and an instance of KubernetesNodePool can be passed
18
+ # into the node_pools array
19
+ #
20
+ # Ex:
21
+ # KubernetesCluster.new(node_pools: [{}])
22
+ # or
23
+ # KubernetesCluster.new(node_pools: [KubernetesNodePool.new()])
24
+ if object.respond_to?(:node_pools) && object.node_pools.respond_to?(:map)
25
+ object.node_pools = object.node_pools.map(&:to_hash)
26
+ end
27
+
28
+ KubernetesClusterMapping.representation_for(:create, object)
29
+ end
17
30
  handler(201) { |response, cluster| KubernetesClusterMapping.extract_into_object(cluster, response.body, :read) }
18
31
  handler(422) { |response| ErrorMapping.fail_with(FailedCreate, response.body) }
19
32
  end
@@ -1,3 +1,3 @@
1
1
  module DropletKit
2
- VERSION = "3.14.0"
2
+ VERSION = "3.15.0"
3
3
  end
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.14.0
4
+ version: 3.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - DigitalOcean API Engineering team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-14 00:00:00.000000000 Z
11
+ date: 2021-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: virtus
@@ -324,7 +324,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
324
324
  - !ruby/object:Gem::Version
325
325
  version: '0'
326
326
  requirements: []
327
- rubygems_version: 3.2.15
327
+ rubygems_version: 3.0.8
328
328
  signing_key:
329
329
  specification_version: 4
330
330
  summary: Droplet Kit is the official Ruby library for DigitalOcean's API