aptible-api 1.6.2 → 1.6.4
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 +4 -4
- data/lib/aptible/api/account.rb +1 -0
- data/lib/aptible/api/database.rb +1 -0
- data/lib/aptible/api/resource.rb +1 -0
- data/lib/aptible/api/service.rb +16 -0
- data/lib/aptible/api/service_sizing_policy.rb +33 -0
- data/lib/aptible/api/version.rb +1 -1
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b0b7e13ed899f14bc07324d8ef60ce88db511ca821057b7051027a4843ad89ba
|
4
|
+
data.tar.gz: 3ad1f7b3abf3657ec98740d0f4ff28b898349a286a2d0e98497b01cd9eeafb6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dafe94ab681bfd13fa0b4fb36d855c44a13fe7c4004d46d93da01f302e0238575050a74f46825eba71204b53dfccb494de7bfdb2f8ace16c0960ed4024d6b8d7
|
7
|
+
data.tar.gz: 8cdf5c4c6267ee97a80a5e499f72abba2d95f6a376a04781332e8e9abf068afd51d154c4252357456bef99601e738382a6628a64a0c56f34a4cba2b3279b97d1
|
data/lib/aptible/api/account.rb
CHANGED
data/lib/aptible/api/database.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
|
@@ -21,6 +22,21 @@ module Aptible
|
|
21
22
|
field :instance_class
|
22
23
|
field :created_at, type: Time
|
23
24
|
field :updated_at, type: Time
|
25
|
+
|
26
|
+
def create_service_sizing_policy!(params)
|
27
|
+
params = { token: token }.merge(params)
|
28
|
+
|
29
|
+
# First create a link object so we know where to go
|
30
|
+
link = HyperResource::Link.new(
|
31
|
+
self,
|
32
|
+
'href' => "#{href}/service_sizing_policies"
|
33
|
+
)
|
34
|
+
|
35
|
+
# Now create the policy
|
36
|
+
link.create(
|
37
|
+
self.class.normalize_params(params)
|
38
|
+
)
|
39
|
+
end
|
24
40
|
end
|
25
41
|
end
|
26
42
|
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.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frank Macreery
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-09 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
|
@@ -250,7 +251,7 @@ homepage: https://github.com/aptible/aptible-api-ruby
|
|
250
251
|
licenses:
|
251
252
|
- MIT
|
252
253
|
metadata: {}
|
253
|
-
post_install_message:
|
254
|
+
post_install_message:
|
254
255
|
rdoc_options: []
|
255
256
|
require_paths:
|
256
257
|
- lib
|
@@ -265,8 +266,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
265
266
|
- !ruby/object:Gem::Version
|
266
267
|
version: '0'
|
267
268
|
requirements: []
|
268
|
-
rubygems_version: 3.
|
269
|
-
signing_key:
|
269
|
+
rubygems_version: 3.1.6
|
270
|
+
signing_key:
|
270
271
|
specification_version: 4
|
271
272
|
summary: Ruby client for api.aptible.com
|
272
273
|
test_files:
|