aptible-api 1.2.12 → 1.2.13
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0b57c1a6d2049fb2e1edb9bcd14afecd8502ca142e78dec0114ef685bfd6fd72
|
|
4
|
+
data.tar.gz: 0666abf930478a16660e70cc5f57c51b9be693bc6da976fa25e11eb1502e0580
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 60453213ffcd4ad145b09782f7249e23cc66d5574cd73f58949340c0b905bfb0625977d3858b5e4de7af8e41420a961fbb308f08c1619008f47b7651f2ea8ae1
|
|
7
|
+
data.tar.gz: 98cc67ff26b323b7cd00363224bfa2739b2411f41806725c4fa492ddc5fed7e3b7aa381bddc4f19bedb922b459ce8c71ab048960f653abf58016e9f1c00157a7
|
|
@@ -4,6 +4,7 @@ module Aptible
|
|
|
4
4
|
belongs_to :stack
|
|
5
5
|
belongs_to :ami
|
|
6
6
|
has_many :operations
|
|
7
|
+
has_many :instance_layer_memberships
|
|
7
8
|
embeds_many :databases
|
|
8
9
|
|
|
9
10
|
field :id
|
|
@@ -11,10 +12,21 @@ module Aptible
|
|
|
11
12
|
field :instance_type
|
|
12
13
|
field :availability_zone
|
|
13
14
|
field :name
|
|
14
|
-
field :layers
|
|
15
15
|
field :status
|
|
16
16
|
field :created_at, type: Time
|
|
17
17
|
field :updated_at, type: Time
|
|
18
|
+
|
|
19
|
+
def stack_layers
|
|
20
|
+
instance_layer_memberships.map(&:links)
|
|
21
|
+
.map(&:stack_layer)
|
|
22
|
+
.uniq(&:href)
|
|
23
|
+
.map(&:get)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Layers as an array of strings
|
|
27
|
+
def layers
|
|
28
|
+
stack_layers.map(&:name)
|
|
29
|
+
end
|
|
18
30
|
end
|
|
19
31
|
end
|
|
20
32
|
end
|
data/lib/aptible/api/resource.rb
CHANGED
|
@@ -27,6 +27,7 @@ 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'
|
|
31
32
|
require 'aptible/api/operation'
|
|
32
33
|
require 'aptible/api/permission'
|
|
@@ -35,6 +36,7 @@ require 'aptible/api/service'
|
|
|
35
36
|
require 'aptible/api/vhost'
|
|
36
37
|
require 'aptible/api/ssh_portal_connection'
|
|
37
38
|
require 'aptible/api/stack'
|
|
39
|
+
require 'aptible/api/stack_layer'
|
|
38
40
|
require 'aptible/api/database_credential'
|
|
39
41
|
require 'aptible/api/ephemeral_session'
|
|
40
42
|
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.13
|
|
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-06-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: aptible-auth
|
|
@@ -200,6 +200,7 @@ 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
|
|
204
205
|
- lib/aptible/api/metric_drain.rb
|
|
205
206
|
- lib/aptible/api/operation.rb
|
|
@@ -209,6 +210,7 @@ files:
|
|
|
209
210
|
- lib/aptible/api/service.rb
|
|
210
211
|
- lib/aptible/api/ssh_portal_connection.rb
|
|
211
212
|
- lib/aptible/api/stack.rb
|
|
213
|
+
- lib/aptible/api/stack_layer.rb
|
|
212
214
|
- lib/aptible/api/version.rb
|
|
213
215
|
- lib/aptible/api/vhost.rb
|
|
214
216
|
- spec/aptible/api/agent_spec.rb
|
|
@@ -236,7 +238,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
236
238
|
- !ruby/object:Gem::Version
|
|
237
239
|
version: '0'
|
|
238
240
|
requirements: []
|
|
239
|
-
rubygems_version: 3.0.
|
|
241
|
+
rubygems_version: 3.0.9
|
|
240
242
|
signing_key:
|
|
241
243
|
specification_version: 4
|
|
242
244
|
summary: Ruby client for api.aptible.com
|