aptible-api 1.6.3 → 1.6.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aptible/api/account.rb +1 -0
- data/lib/aptible/api/resource.rb +1 -0
- data/lib/aptible/api/service.rb +18 -0
- data/lib/aptible/api/service_sizing_policy.rb +33 -0
- data/lib/aptible/api/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f74e4aec03b8e232c19b3e8eae44aeb9346a3317789607db7c5001adc7652713
|
4
|
+
data.tar.gz: dd48f3cb485205148b76df27ff80ce77890b300e0ea42d9a659736250872c31c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d56ce6a4778a5726285ccb71ae38d419e6114386281d13bf47724beeb91ef593abd4e47529c271983458abe976fd52b5b42d8e194c56fb4634392a3e2f52279
|
7
|
+
data.tar.gz: 4861e08ab34936daca714e8d2bc0907e326329f563f811b7f79e0db8ef6f4ebfa36d3f114042c0a08dc773bfd8a13a979a93f202127f7ae900b15f2acc7cba20
|
data/lib/aptible/api/account.rb
CHANGED
data/lib/aptible/api/resource.rb
CHANGED
@@ -35,6 +35,7 @@ require 'aptible/api/operation'
|
|
35
35
|
require 'aptible/api/permission'
|
36
36
|
require 'aptible/api/release'
|
37
37
|
require 'aptible/api/service'
|
38
|
+
require 'aptible/api/service_sizing_policy'
|
38
39
|
require 'aptible/api/source'
|
39
40
|
require 'aptible/api/vhost'
|
40
41
|
require 'aptible/api/ssh_portal_connection'
|
data/lib/aptible/api/service.rb
CHANGED
@@ -9,6 +9,7 @@ module Aptible
|
|
9
9
|
has_many :operations
|
10
10
|
has_many :releases
|
11
11
|
has_many :disk_attachments
|
12
|
+
has_one :service_sizing_policy
|
12
13
|
|
13
14
|
field :id
|
14
15
|
field :handle
|
@@ -19,8 +20,25 @@ module Aptible
|
|
19
20
|
field :container_count
|
20
21
|
field :container_memory_limit_mb
|
21
22
|
field :instance_class
|
23
|
+
field :force_zero_downtime
|
24
|
+
field :naive_health_check
|
22
25
|
field :created_at, type: Time
|
23
26
|
field :updated_at, type: Time
|
27
|
+
|
28
|
+
def create_service_sizing_policy!(params)
|
29
|
+
params = { token: token }.merge(params)
|
30
|
+
|
31
|
+
# First create a link object so we know where to go
|
32
|
+
link = HyperResource::Link.new(
|
33
|
+
self,
|
34
|
+
'href' => "#{href}/service_sizing_policies"
|
35
|
+
)
|
36
|
+
|
37
|
+
# Now create the policy
|
38
|
+
link.create(
|
39
|
+
self.class.normalize_params(params)
|
40
|
+
)
|
41
|
+
end
|
24
42
|
end
|
25
43
|
end
|
26
44
|
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Aptible
|
2
|
+
module Api
|
3
|
+
class ServiceSizingPolicy < Resource
|
4
|
+
belongs_to :account
|
5
|
+
has_many :services
|
6
|
+
|
7
|
+
field :id
|
8
|
+
field :created_at, type: Time
|
9
|
+
field :updated_at, type: Time
|
10
|
+
|
11
|
+
field :scaling_enabled
|
12
|
+
field :default_policy
|
13
|
+
field :metric_lookback_seconds
|
14
|
+
field :percentile
|
15
|
+
field :post_scale_up_cooldown_seconds
|
16
|
+
field :post_scale_down_cooldown_seconds
|
17
|
+
field :post_release_cooldown_seconds
|
18
|
+
field :mem_cpu_ratio_r_threshold
|
19
|
+
field :mem_cpu_ratio_c_threshold
|
20
|
+
field :mem_scale_up_threshold
|
21
|
+
field :mem_scale_down_threshold
|
22
|
+
field :minimum_memory
|
23
|
+
field :disable_recommendations
|
24
|
+
field :maximum_memory
|
25
|
+
field :cpu_consideration_threshold
|
26
|
+
field :autoscaling
|
27
|
+
field :min_cpu_threshold
|
28
|
+
field :max_cpu_threshold
|
29
|
+
field :min_containers
|
30
|
+
field :max_containers
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
data/lib/aptible/api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aptible-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frank Macreery
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aptible-auth
|
@@ -233,6 +233,7 @@ files:
|
|
233
233
|
- lib/aptible/api/resource.rb
|
234
234
|
- lib/aptible/api/service.rb
|
235
235
|
- lib/aptible/api/service_definition.rb
|
236
|
+
- lib/aptible/api/service_sizing_policy.rb
|
236
237
|
- lib/aptible/api/source.rb
|
237
238
|
- lib/aptible/api/ssh_portal_connection.rb
|
238
239
|
- lib/aptible/api/stack.rb
|