aptible-api 1.2.12 → 1.2.16
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/aws_instance.rb +21 -2
- data/lib/aptible/api/instance_layer_membership.rb +10 -0
- data/lib/aptible/api/log_drain.rb +5 -1
- data/lib/aptible/api/log_drain_backend.rb +17 -0
- data/lib/aptible/api/operation.rb +1 -0
- data/lib/aptible/api/resource.rb +3 -0
- data/lib/aptible/api/stack.rb +6 -0
- data/lib/aptible/api/stack_layer.rb +27 -0
- data/lib/aptible/api/version.rb +1 -1
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 972fa72d58bc957979098aa0be318f100b67e8ef4a9c6a64aab620540f69bbad
|
4
|
+
data.tar.gz: 9df970a4905457b523266111afd69cc41386abf2ef02cc49173ede8db0b0794b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc299fd6d6269caab0dc9854cdf7a2e79f9e5e6f3638b7888e7e8f8f9aca1123b90d3352c606ec051c8f7ccf9d0ee345cb0c02463de84f5a13b16cb72aabb273
|
7
|
+
data.tar.gz: '079fc24e88babc5cf776d20bd4e19972327589849664b53dd2637aad814b0bfe55d3583a95ffb3df14acef7c26b2e4d2d7d448308f27486fd8fa30f960808c10'
|
@@ -4,17 +4,36 @@ module Aptible
|
|
4
4
|
belongs_to :stack
|
5
5
|
belongs_to :ami
|
6
6
|
has_many :operations
|
7
|
-
|
7
|
+
has_many :instance_layer_memberships
|
8
|
+
has_many :databases
|
8
9
|
|
9
10
|
field :id
|
10
11
|
field :instance_id
|
11
12
|
field :instance_type
|
12
13
|
field :availability_zone
|
13
14
|
field :name
|
14
|
-
field :layers
|
15
15
|
field :status
|
16
|
+
field :kernel_version
|
17
|
+
field :os_version
|
18
|
+
field :docker_version
|
19
|
+
field :runtime_data
|
20
|
+
field :deprovisionable, type: Aptible::Resource::Boolean
|
16
21
|
field :created_at, type: Time
|
17
22
|
field :updated_at, type: Time
|
23
|
+
field :retain_until, type: Time
|
24
|
+
field :runtime_published_at, type: Time
|
25
|
+
|
26
|
+
def stack_layers
|
27
|
+
instance_layer_memberships.map(&:links)
|
28
|
+
.map(&:stack_layer)
|
29
|
+
.uniq(&:href)
|
30
|
+
.map(&:get)
|
31
|
+
end
|
32
|
+
|
33
|
+
# Layers as an array of strings
|
34
|
+
def layers
|
35
|
+
stack_layers.map(&:name)
|
36
|
+
end
|
18
37
|
end
|
19
38
|
end
|
20
39
|
end
|
@@ -6,9 +6,13 @@ module Aptible
|
|
6
6
|
has_many :operations
|
7
7
|
has_many :containers
|
8
8
|
|
9
|
+
# Temporary until deploy-api renames this field
|
10
|
+
embeds_one :new_backend
|
11
|
+
# Necessary to avoid downtime when new_backend becomes backend
|
12
|
+
embeds_one :backend
|
13
|
+
|
9
14
|
field :id
|
10
15
|
field :handle
|
11
|
-
field :backend
|
12
16
|
field :drain_type
|
13
17
|
field :drain_host
|
14
18
|
field :drain_port
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Aptible
|
2
|
+
module Api
|
3
|
+
class LogDrainBackend < Resource
|
4
|
+
has_many :log_drains
|
5
|
+
|
6
|
+
field :id
|
7
|
+
field :current, type: Aptible::Resource::Boolean
|
8
|
+
field :channel
|
9
|
+
field :gentlemanjerry_image
|
10
|
+
field :gentlemanjerry_tag
|
11
|
+
field :joecool_image
|
12
|
+
field :joecool_tag
|
13
|
+
field :created_at, type: Time
|
14
|
+
field :updated_at, type: Time
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/lib/aptible/api/resource.rb
CHANGED
@@ -27,7 +27,9 @@ require 'aptible/api/database'
|
|
27
27
|
require 'aptible/api/database_image'
|
28
28
|
require 'aptible/api/disk'
|
29
29
|
require 'aptible/api/image'
|
30
|
+
require 'aptible/api/instance_layer_membership'
|
30
31
|
require 'aptible/api/log_drain'
|
32
|
+
require 'aptible/api/log_drain_backend'
|
31
33
|
require 'aptible/api/operation'
|
32
34
|
require 'aptible/api/permission'
|
33
35
|
require 'aptible/api/release'
|
@@ -35,6 +37,7 @@ require 'aptible/api/service'
|
|
35
37
|
require 'aptible/api/vhost'
|
36
38
|
require 'aptible/api/ssh_portal_connection'
|
37
39
|
require 'aptible/api/stack'
|
40
|
+
require 'aptible/api/stack_layer'
|
38
41
|
require 'aptible/api/database_credential'
|
39
42
|
require 'aptible/api/ephemeral_session'
|
40
43
|
require 'aptible/api/ephemeral_container'
|
data/lib/aptible/api/stack.rb
CHANGED
@@ -2,6 +2,8 @@ module Aptible
|
|
2
2
|
module Api
|
3
3
|
class Stack < Resource
|
4
4
|
has_many :aws_instances
|
5
|
+
has_many :stack_layers
|
6
|
+
has_many :operations
|
5
7
|
|
6
8
|
field :id
|
7
9
|
field :type
|
@@ -16,6 +18,10 @@ module Aptible
|
|
16
18
|
field :ssh_portal_port
|
17
19
|
field :created_at, type: Time
|
18
20
|
field :updated_at, type: Time
|
21
|
+
|
22
|
+
def dns_layers
|
23
|
+
stack_layers.reject! { |l| l.dns_name.blank? }
|
24
|
+
end
|
19
25
|
end
|
20
26
|
end
|
21
27
|
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Aptible
|
2
|
+
module Api
|
3
|
+
class StackLayer < Resource
|
4
|
+
belongs_to :stack
|
5
|
+
belongs_to :lead_instance
|
6
|
+
has_many :instance_layer_memberships
|
7
|
+
|
8
|
+
field :id
|
9
|
+
field :name
|
10
|
+
field :opsworks_layer_id
|
11
|
+
field :lead_instance_hostname
|
12
|
+
field :dns, type: Aptible::Resource::Boolean
|
13
|
+
field :internal_only_dns, type: Aptible::Resource::Boolean
|
14
|
+
field :dns_name
|
15
|
+
field :dns_provisioned_instance_id
|
16
|
+
field :outbound, type: Aptible::Resource::Boolean
|
17
|
+
field :created_at, type: Time
|
18
|
+
field :updated_at, type: Time
|
19
|
+
|
20
|
+
def dns_provisioned?
|
21
|
+
!dns_provisioned_instance_id.nil? &&
|
22
|
+
!lead_instance.nil? &&
|
23
|
+
lead_instance.id == dns_provisioned_instance_id
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
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.2.
|
4
|
+
version: 1.2.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frank Macreery
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aptible-auth
|
@@ -200,7 +200,9 @@ files:
|
|
200
200
|
- lib/aptible/api/ephemeral_container.rb
|
201
201
|
- lib/aptible/api/ephemeral_session.rb
|
202
202
|
- lib/aptible/api/image.rb
|
203
|
+
- lib/aptible/api/instance_layer_membership.rb
|
203
204
|
- lib/aptible/api/log_drain.rb
|
205
|
+
- lib/aptible/api/log_drain_backend.rb
|
204
206
|
- lib/aptible/api/metric_drain.rb
|
205
207
|
- lib/aptible/api/operation.rb
|
206
208
|
- lib/aptible/api/permission.rb
|
@@ -209,6 +211,7 @@ files:
|
|
209
211
|
- lib/aptible/api/service.rb
|
210
212
|
- lib/aptible/api/ssh_portal_connection.rb
|
211
213
|
- lib/aptible/api/stack.rb
|
214
|
+
- lib/aptible/api/stack_layer.rb
|
212
215
|
- lib/aptible/api/version.rb
|
213
216
|
- lib/aptible/api/vhost.rb
|
214
217
|
- spec/aptible/api/agent_spec.rb
|
@@ -236,7 +239,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
236
239
|
- !ruby/object:Gem::Version
|
237
240
|
version: '0'
|
238
241
|
requirements: []
|
239
|
-
rubygems_version: 3.0.
|
242
|
+
rubygems_version: 3.0.9
|
240
243
|
signing_key:
|
241
244
|
specification_version: 4
|
242
245
|
summary: Ruby client for api.aptible.com
|