en-aws-synchronizer 0.2.1 → 0.2.2

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: f89207bf23e6c1319e92436e2d5a5f3bdd5a85ae0dba456547717048b6dd36a8
4
- data.tar.gz: 22ddb9f225fd2951a7f471bdbf6172fa75f704b9d8964bdddeec8eb89ab921d5
3
+ metadata.gz: a1dc75b66226e99c4924028f07027b501c014e03217d842e3e2df101178f8c66
4
+ data.tar.gz: e85604ff425d9ac338ed1c07bb63d70216303153d67db5c1e8bcb0018c1c793e
5
5
  SHA512:
6
- metadata.gz: 70da7e4101db37478358aa935aca66d1b849aa55e5fed3295bfb2ae9b19b17d99238d66e7bd17b6cfd22355544401ebd183850d8730dbeae5cb31a748a48a384
7
- data.tar.gz: 155842d9824f6250790eccd3b77cbe682f5cb5bb22c6f587ee41a749ca2703b46efb8546190d4a5f007f4e6efcc5d7c11a68214b09182807b54e2dd83554d195
6
+ metadata.gz: daa97f091ed96248c6f5e8636fb25e8d795a2c213cadcee56ca264dbb7c24420a6a5c8633bc6eb91bf99a0c6aea916dad3207dba8ff153477ab25ea66c30be1a
7
+ data.tar.gz: 63be42217777aac653283136c2ccc843178d6fa8eb6160b5502a4ead9e9256944a73fccf37ce9da33797ae6a530e28cfcb8bf5bd79af4afb9045ad8ee69f6afa
@@ -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 ECS
9
+
10
+ def describe_ecs_clusters(credential, region_code)
11
+ agent = Eaglenube::AWSAgent.get_ecs_agent(credential, region_code)
12
+ agent.describe_clusters.try(:clusters)
13
+ end
14
+
15
+ end
16
+ end
17
+ end
18
+ end
@@ -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 LaunchConfiguration
9
+
10
+ def describe_launch_configurations(credential, region_code)
11
+ agent = Eaglenube::AWSAgent.get_auto_scaling_agent(credential, region_code)
12
+ agent.describe_launch_configurations.try(:launch_configurations)
13
+ end
14
+
15
+ end
16
+ end
17
+ end
18
+ end
@@ -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 LaunchTemplate
9
+
10
+ def describe_launch_templates(credential, region_code)
11
+ agent = Eaglenube::AWSAgent.get_compute_agent(credential, region_code)
12
+ agent.describe_launch_templates.try(:launch_templates)
13
+ end
14
+
15
+ end
16
+ end
17
+ end
18
+ end
@@ -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 Redshift
9
+
10
+ def describe_redshift_clusters(credential, region_code)
11
+ agent = Eaglenube::AWSAgent.get_redshift_agent(credential, region_code)
12
+ agent.describe_clusters.try(:clusters)
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/ecs"
4
+ require "eaglenube/synchronizer/aws"
5
+ require "eaglenube/cloud_object_mapper/aws"
6
+
7
+ # Eaglenube::Synchronizer::AWS::ECS
8
+ module Eaglenube
9
+ module Synchronizer
10
+ module AWS
11
+ module ECS
12
+ def self.included(receiver)
13
+ receiver.extend Eaglenube::Synchronizer::AWS::CommonMethods
14
+ receiver.extend ECSSyncMethods
15
+ end
16
+
17
+ module ECSSyncMethods
18
+ include Eaglenube::ApiWrapper::AWS::ECS
19
+ include Eaglenube::CloudObjectMapper::AWS
20
+
21
+ def sync_resource(credential, region_code, &_block)
22
+ remote_ecs_clusters = describe_ecs_clusters(credential, region_code)
23
+ remote_ecs_clusters.each do |remote_cluster|
24
+ object_identifying_attributes, optional_attributes = yield(remote_cluster)
25
+ create_or_update(remote_cluster, object_identifying_attributes, **optional_attributes)
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "eaglenube/api_wrapper/aws/launch_configuration"
4
+ require "eaglenube/synchronizer/aws"
5
+ require "eaglenube/cloud_object_mapper/aws"
6
+
7
+ # Eaglenube::Synchronizer::AWS::LaunchConfiguration
8
+ module Eaglenube
9
+ module Synchronizer
10
+ module AWS
11
+ module LaunchConfiguration
12
+ def self.included(receiver)
13
+ receiver.extend Eaglenube::Synchronizer::AWS::CommonMethods
14
+ receiver.extend LaunchConfigurationSyncMethods
15
+ end
16
+
17
+ module LaunchConfigurationSyncMethods
18
+ include Eaglenube::ApiWrapper::AWS::LaunchConfiguration
19
+ include Eaglenube::CloudObjectMapper::AWS
20
+
21
+ def sync_resource(credential, region_code, &_block)
22
+ remote_lcs = describe_launch_configurations(credential, region_code)
23
+ remote_lcs.each do |remote_launch_configuration|
24
+ object_identifying_attributes, optional_attributes = yield(remote_launch_configuration)
25
+ create_or_update(remote_launch_configuration, object_identifying_attributes, **optional_attributes)
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "eaglenube/api_wrapper/aws/launch_template"
4
+ require "eaglenube/synchronizer/aws"
5
+ require "eaglenube/cloud_object_mapper/aws"
6
+
7
+ # Eaglenube::Synchronizer::AWS::LaunchTemplate
8
+ module Eaglenube
9
+ module Synchronizer
10
+ module AWS
11
+ module LaunchTemplate
12
+ def self.included(receiver)
13
+ receiver.extend Eaglenube::Synchronizer::AWS::CommonMethods
14
+ receiver.extend LaunchTemplateSyncMethods
15
+ end
16
+
17
+ module LaunchTemplateSyncMethods
18
+ include Eaglenube::ApiWrapper::AWS::LaunchTemplate
19
+ include Eaglenube::CloudObjectMapper::AWS
20
+
21
+ def sync_resource(credential, region_code, &_block)
22
+ remote_launch_templates = describe_launch_templates(credential, region_code)
23
+ remote_launch_templates.each do |remote_launch_template|
24
+ object_identifying_attributes, optional_attributes = yield(remote_launch_template)
25
+ create_or_update(remote_launch_template, object_identifying_attributes, **optional_attributes)
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "eaglenube/api_wrapper/aws/redshift"
4
+ require "eaglenube/synchronizer/aws"
5
+ require "eaglenube/cloud_object_mapper/aws"
6
+
7
+ # Eaglenube::Synchronizer::AWS::Redshift
8
+ module Eaglenube
9
+ module Synchronizer
10
+ module AWS
11
+ module Redshift
12
+ def self.included(receiver)
13
+ receiver.extend Eaglenube::Synchronizer::AWS::CommonMethods
14
+ receiver.extend RedshiftSyncMethods
15
+ end
16
+
17
+ module RedshiftSyncMethods
18
+ include Eaglenube::ApiWrapper::AWS::Redshift
19
+ include Eaglenube::CloudObjectMapper::AWS
20
+
21
+ def sync_resource(credential, region_code, &_block)
22
+ remote_redshift_clusters = describe_redshift_clusters(credential, region_code)
23
+ remote_redshift_clusters.each do |remote_redshift_cluster|
24
+ object_identifying_attributes, optional_attributes = yield(remote_redshift_cluster)
25
+ create_or_update(remote_redshift_cluster, object_identifying_attributes, **optional_attributes)
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Eaglenube
4
4
  module Synchronizer
5
- VERSION = "0.2.1"
5
+ VERSION = "0.2.2"
6
6
  end
7
7
  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.1
4
+ version: 0.2.2
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-25 00:00:00.000000000 Z
11
+ date: 2024-12-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-acm
@@ -182,11 +182,15 @@ files:
182
182
  - lib/eaglenube/api_wrapper/aws/acm_certificate.rb
183
183
  - lib/eaglenube/api_wrapper/aws/database.rb
184
184
  - lib/eaglenube/api_wrapper/aws/db_snapshot.rb
185
+ - lib/eaglenube/api_wrapper/aws/ecs.rb
185
186
  - lib/eaglenube/api_wrapper/aws/elastic_ip.rb
186
187
  - lib/eaglenube/api_wrapper/aws/iam_certificate.rb
187
188
  - lib/eaglenube/api_wrapper/aws/internet_gateway.rb
188
189
  - lib/eaglenube/api_wrapper/aws/key_pair.rb
190
+ - lib/eaglenube/api_wrapper/aws/launch_configuration.rb
191
+ - lib/eaglenube/api_wrapper/aws/launch_template.rb
189
192
  - lib/eaglenube/api_wrapper/aws/loadbalancer.rb
193
+ - lib/eaglenube/api_wrapper/aws/redshift.rb
190
194
  - lib/eaglenube/api_wrapper/aws/security_group.rb
191
195
  - lib/eaglenube/api_wrapper/aws/snapshot.rb
192
196
  - lib/eaglenube/api_wrapper/aws/subnet.rb
@@ -200,10 +204,14 @@ files:
200
204
  - lib/eaglenube/synchronizer/aws/acm_certificate.rb
201
205
  - lib/eaglenube/synchronizer/aws/database.rb
202
206
  - lib/eaglenube/synchronizer/aws/db_snapshot.rb
207
+ - lib/eaglenube/synchronizer/aws/ecs.rb
203
208
  - lib/eaglenube/synchronizer/aws/elastic_ip.rb
204
209
  - lib/eaglenube/synchronizer/aws/iam_certificate.rb
205
210
  - lib/eaglenube/synchronizer/aws/key_pair.rb
211
+ - lib/eaglenube/synchronizer/aws/launch_configuration.rb
212
+ - lib/eaglenube/synchronizer/aws/launch_template.rb
206
213
  - lib/eaglenube/synchronizer/aws/loadbalancer.rb
214
+ - lib/eaglenube/synchronizer/aws/redshift.rb
207
215
  - lib/eaglenube/synchronizer/aws/security_group.rb
208
216
  - lib/eaglenube/synchronizer/aws/snapshot.rb
209
217
  - lib/eaglenube/synchronizer/aws/subnet.rb