en-aws-synchronizer 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f89207bf23e6c1319e92436e2d5a5f3bdd5a85ae0dba456547717048b6dd36a8
|
4
|
+
data.tar.gz: 22ddb9f225fd2951a7f471bdbf6172fa75f704b9d8964bdddeec8eb89ab921d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 70da7e4101db37478358aa935aca66d1b849aa55e5fed3295bfb2ae9b19b17d99238d66e7bd17b6cfd22355544401ebd183850d8730dbeae5cb31a748a48a384
|
7
|
+
data.tar.gz: 155842d9824f6250790eccd3b77cbe682f5cb5bb22c6f587ee41a749ca2703b46efb8546190d4a5f007f4e6efcc5d7c11a68214b09182807b54e2dd83554d195
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "eaglenube/aws_agent"
|
4
|
+
|
5
|
+
module Eaglenube
|
6
|
+
module ApiWrapper
|
7
|
+
module AWS
|
8
|
+
module Database
|
9
|
+
|
10
|
+
def describe_db_instances(credential, region_code)
|
11
|
+
agent = Eaglenube::AWSAgent.get_rds_agent(credential, region_code)
|
12
|
+
agent.describe_db_instances.try(:db_instances)
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "eaglenube/api_wrapper/aws/database"
|
4
|
+
require "eaglenube/synchronizer/aws"
|
5
|
+
require "eaglenube/cloud_object_mapper/aws"
|
6
|
+
|
7
|
+
# Eaglenube::Synchronizer::AWS::Database
|
8
|
+
module Eaglenube
|
9
|
+
module Synchronizer
|
10
|
+
module AWS
|
11
|
+
module Database
|
12
|
+
def self.included(receiver)
|
13
|
+
receiver.extend Eaglenube::Synchronizer::AWS::CommonMethods
|
14
|
+
receiver.extend AcmSyncMethods
|
15
|
+
end
|
16
|
+
|
17
|
+
module AcmSyncMethods
|
18
|
+
include Eaglenube::ApiWrapper::AWS::Database
|
19
|
+
include Eaglenube::CloudObjectMapper::AWS
|
20
|
+
|
21
|
+
def sync_resource(credential, region_code)
|
22
|
+
remote_db_instances = describe_db_instances(credential, region_code)
|
23
|
+
remote_db_instances.each do |remote_db_instance|
|
24
|
+
object_identifying_attributes, optional_attributes = yield(remote_db_instance)
|
25
|
+
create_or_update(remote_db_instance, object_identifying_attributes, **optional_attributes)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: en-aws-synchronizer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eaglenube
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-08-
|
11
|
+
date: 2024-08-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-acm
|
@@ -180,6 +180,7 @@ files:
|
|
180
180
|
- Rakefile
|
181
181
|
- en_aws_synchronizer.gemspec
|
182
182
|
- lib/eaglenube/api_wrapper/aws/acm_certificate.rb
|
183
|
+
- lib/eaglenube/api_wrapper/aws/database.rb
|
183
184
|
- lib/eaglenube/api_wrapper/aws/db_snapshot.rb
|
184
185
|
- lib/eaglenube/api_wrapper/aws/elastic_ip.rb
|
185
186
|
- lib/eaglenube/api_wrapper/aws/iam_certificate.rb
|
@@ -197,6 +198,7 @@ files:
|
|
197
198
|
- lib/eaglenube/synchronizer.rb
|
198
199
|
- lib/eaglenube/synchronizer/aws.rb
|
199
200
|
- lib/eaglenube/synchronizer/aws/acm_certificate.rb
|
201
|
+
- lib/eaglenube/synchronizer/aws/database.rb
|
200
202
|
- lib/eaglenube/synchronizer/aws/db_snapshot.rb
|
201
203
|
- lib/eaglenube/synchronizer/aws/elastic_ip.rb
|
202
204
|
- lib/eaglenube/synchronizer/aws/iam_certificate.rb
|