aptible-api 1.0.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/CODEOWNERS +1 -0
- data/.travis.yml +3 -0
- data/README.md +1 -3
- data/Rakefile +1 -1
- data/aptible-api.gemspec +7 -6
- data/lib/aptible/api.rb +2 -0
- data/lib/aptible/api/account.rb +3 -0
- data/lib/aptible/api/backup.rb +5 -0
- data/lib/aptible/api/backup_retention_policy.rb +16 -0
- data/lib/aptible/api/container.rb +2 -0
- data/lib/aptible/api/database.rb +1 -0
- data/lib/aptible/api/metric_drain.rb +28 -0
- data/lib/aptible/api/operation.rb +1 -1
- data/lib/aptible/api/resource.rb +2 -0
- data/lib/aptible/api/version.rb +1 -1
- metadata +45 -43
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 7d7b3b6b74c36ca95830a7a52a9bf9caf34c0866ecbadb855ba4031dfe3d2e1c
|
4
|
+
data.tar.gz: 1ca07b8a229dd6f285cf02fd2f44429ba97f1a89cd5c38547391783db1905f77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f617bccf1fec24fa5ddfa1c4c0966d517640f0c71a1eb21194e4d05bdaee14826d92ebb161cd2fa819780dccfc7cb0897c52005fa98e124586f5c6a9b2947961
|
7
|
+
data.tar.gz: c1e1493f91542908b1498b740451ed1ef3b0f89661466650135b539a8e3bf89611b8de15ba96f02deba69c2c4ca47f18ce523d926d19c058110c72ece2321e1c
|
data/.github/CODEOWNERS
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
* @almathew
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -61,6 +61,4 @@ end
|
|
61
61
|
|
62
62
|
MIT License, see [LICENSE](LICENSE.md) for details.
|
63
63
|
|
64
|
-
Copyright (c)
|
65
|
-
|
66
|
-
[<img src="https://s.gravatar.com/avatar/9b58236204e844e3181e43e05ddb0809?s=60" style="border-radius: 50%;" alt="@sandersonet" />](https://github.com/sandersonet)
|
64
|
+
Copyright (c) 2019 [Aptible](https://www.aptible.com) and contributors.
|
data/Rakefile
CHANGED
data/aptible-api.gemspec
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
+
|
2
3
|
lib = File.expand_path('../lib', __FILE__)
|
3
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
5
|
|
@@ -19,15 +20,15 @@ Gem::Specification.new do |spec|
|
|
19
20
|
spec.test_files = spec.files.grep(%r{^spec/})
|
20
21
|
spec.require_paths = ['lib']
|
21
22
|
|
22
|
-
spec.add_dependency 'aptible-
|
23
|
-
spec.add_dependency 'aptible-
|
23
|
+
spec.add_dependency 'aptible-auth', '~> 1.0'
|
24
|
+
spec.add_dependency 'aptible-resource', '~> 1.0'
|
24
25
|
spec.add_dependency 'gem_config'
|
25
26
|
|
26
|
-
spec.add_development_dependency 'bundler', '~> 1.3'
|
27
|
-
spec.add_development_dependency 'aptible-tasks', '>= 0.2.0'
|
28
27
|
spec.add_development_dependency 'activesupport'
|
29
|
-
spec.add_development_dependency '
|
30
|
-
spec.add_development_dependency '
|
28
|
+
spec.add_development_dependency 'aptible-tasks', '>= 0.2.0'
|
29
|
+
spec.add_development_dependency 'bundler', '~> 1.3'
|
31
30
|
spec.add_development_dependency 'foreman'
|
32
31
|
spec.add_development_dependency 'pry'
|
32
|
+
spec.add_development_dependency 'rake', '~> 10.5'
|
33
|
+
spec.add_development_dependency 'rspec', '~> 2.0'
|
33
34
|
end
|
data/lib/aptible/api.rb
CHANGED
data/lib/aptible/api/account.rb
CHANGED
@@ -12,6 +12,8 @@ module Aptible
|
|
12
12
|
has_many :disks
|
13
13
|
has_many :services
|
14
14
|
has_many :permissions
|
15
|
+
has_many :metric_drains
|
16
|
+
has_many :backup_retention_policy
|
15
17
|
embeds_many :log_drains
|
16
18
|
|
17
19
|
field :id
|
@@ -50,6 +52,7 @@ module Aptible
|
|
50
52
|
|
51
53
|
def organization
|
52
54
|
return @organization if @organization
|
55
|
+
|
53
56
|
auth = Aptible::Auth::Organization.new(token: token, headers: headers)
|
54
57
|
@organization = auth.find_by_url(organization_url)
|
55
58
|
end
|
data/lib/aptible/api/backup.rb
CHANGED
@@ -14,6 +14,11 @@ module Aptible
|
|
14
14
|
field :aws_region
|
15
15
|
field :created_at, type: Time
|
16
16
|
field :updated_at, type: Time
|
17
|
+
|
18
|
+
def database_with_deleted
|
19
|
+
db_id = links['database'].href.split('/').last
|
20
|
+
Database.find(db_id, with_deleted: true, token: token, headers: headers)
|
21
|
+
end
|
17
22
|
end
|
18
23
|
end
|
19
24
|
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Aptible
|
2
|
+
module Api
|
3
|
+
class BackupRetentionPolicy < Resource
|
4
|
+
belongs_to :account
|
5
|
+
|
6
|
+
field :id
|
7
|
+
field :daily
|
8
|
+
field :monthly
|
9
|
+
field :make_copy, type: Aptible::Resource::Boolean
|
10
|
+
field :created_at, type: Time
|
11
|
+
field :updated_at, type: Time
|
12
|
+
field :keep_final, type: Aptible::Resource::Boolean
|
13
|
+
field :account_id
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -4,6 +4,7 @@ module Aptible
|
|
4
4
|
belongs_to :release
|
5
5
|
belongs_to :vhost
|
6
6
|
belongs_to :log_drain
|
7
|
+
belongs_to :metric_drain
|
7
8
|
|
8
9
|
field :id
|
9
10
|
field :host
|
@@ -16,6 +17,7 @@ module Aptible
|
|
16
17
|
field :layer
|
17
18
|
field :aws_instance_id
|
18
19
|
field :port_mapping
|
20
|
+
field :mounts
|
19
21
|
end
|
20
22
|
end
|
21
23
|
end
|
data/lib/aptible/api/database.rb
CHANGED
@@ -0,0 +1,28 @@
|
|
1
|
+
module Aptible
|
2
|
+
module Api
|
3
|
+
class MetricDrain < Resource
|
4
|
+
belongs_to :account
|
5
|
+
belongs_to :database
|
6
|
+
has_many :operations
|
7
|
+
has_many :containers
|
8
|
+
|
9
|
+
field :id
|
10
|
+
|
11
|
+
field :handle
|
12
|
+
field :status
|
13
|
+
field :drain_type
|
14
|
+
field :drain_configuration
|
15
|
+
|
16
|
+
field :aggregator_ca_certificate
|
17
|
+
field :aggregator_ca_private_key_blob
|
18
|
+
field :aggregator_host
|
19
|
+
field :aggregator_port_mapping
|
20
|
+
field :aggregator_docker_name
|
21
|
+
field :aggregator_instance_id
|
22
|
+
field :aggregator_allocation
|
23
|
+
|
24
|
+
field :created_at, type: Time
|
25
|
+
field :updated_at, type: Time
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
data/lib/aptible/api/resource.rb
CHANGED
data/lib/aptible/api/version.rb
CHANGED
metadata
CHANGED
@@ -1,43 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aptible-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.1
|
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:
|
11
|
+
date: 2020-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name: aptible-
|
14
|
+
name: aptible-auth
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.0
|
19
|
+
version: '1.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.0
|
26
|
+
version: '1.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name: aptible-
|
28
|
+
name: aptible-resource
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.0
|
33
|
+
version: '1.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.0
|
40
|
+
version: '1.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: gem_config
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -53,19 +53,19 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: activesupport
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: aptible-tasks
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -81,75 +81,75 @@ dependencies:
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: 0.2.0
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: bundler
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
89
|
+
version: '1.3'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - "
|
94
|
+
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
96
|
+
version: '1.3'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: foreman
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- - "
|
101
|
+
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
103
|
+
version: '0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- - "
|
108
|
+
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
110
|
+
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
112
|
+
name: pry
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- - "
|
115
|
+
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: '
|
117
|
+
version: '0'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- - "
|
122
|
+
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: '
|
124
|
+
version: '0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
126
|
+
name: rake
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- - "
|
129
|
+
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: '
|
131
|
+
version: '10.5'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- - "
|
136
|
+
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: '
|
138
|
+
version: '10.5'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
|
-
name:
|
140
|
+
name: rspec
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
|
-
- - "
|
143
|
+
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: '0'
|
145
|
+
version: '2.0'
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
|
-
- - "
|
150
|
+
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: '0'
|
152
|
+
version: '2.0'
|
153
153
|
description: Ruby client for api.aptible.com
|
154
154
|
email:
|
155
155
|
- frank@macreery.com
|
@@ -157,6 +157,7 @@ executables: []
|
|
157
157
|
extensions: []
|
158
158
|
extra_rdoc_files: []
|
159
159
|
files:
|
160
|
+
- ".github/CODEOWNERS"
|
160
161
|
- ".gitignore"
|
161
162
|
- ".rspec"
|
162
163
|
- ".travis.yml"
|
@@ -171,6 +172,7 @@ files:
|
|
171
172
|
- lib/aptible/api/agent.rb
|
172
173
|
- lib/aptible/api/app.rb
|
173
174
|
- lib/aptible/api/backup.rb
|
175
|
+
- lib/aptible/api/backup_retention_policy.rb
|
174
176
|
- lib/aptible/api/certificate.rb
|
175
177
|
- lib/aptible/api/configuration.rb
|
176
178
|
- lib/aptible/api/container.rb
|
@@ -182,6 +184,7 @@ files:
|
|
182
184
|
- lib/aptible/api/ephemeral_session.rb
|
183
185
|
- lib/aptible/api/image.rb
|
184
186
|
- lib/aptible/api/log_drain.rb
|
187
|
+
- lib/aptible/api/metric_drain.rb
|
185
188
|
- lib/aptible/api/operation.rb
|
186
189
|
- lib/aptible/api/permission.rb
|
187
190
|
- lib/aptible/api/release.rb
|
@@ -201,7 +204,7 @@ homepage: https://github.com/aptible/aptible-api-ruby
|
|
201
204
|
licenses:
|
202
205
|
- MIT
|
203
206
|
metadata: {}
|
204
|
-
post_install_message:
|
207
|
+
post_install_message:
|
205
208
|
rdoc_options: []
|
206
209
|
require_paths:
|
207
210
|
- lib
|
@@ -216,9 +219,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
216
219
|
- !ruby/object:Gem::Version
|
217
220
|
version: '0'
|
218
221
|
requirements: []
|
219
|
-
|
220
|
-
|
221
|
-
signing_key:
|
222
|
+
rubygems_version: 3.0.3
|
223
|
+
signing_key:
|
222
224
|
specification_version: 4
|
223
225
|
summary: Ruby client for api.aptible.com
|
224
226
|
test_files:
|