Module: Eaglenube::Synchronizer::AWS::ElasticIp::EipSyncMethods

Includes:
ApiWrapper::AWS::ElasticIp, CloudObjectMapper::AWS
Defined in:
lib/eaglenube/synchronizer/aws/elastic_ip.rb

Instance Method Summary collapse

Methods included from CloudObjectMapper::AWS

#cloud_obj_mapper, #cloud_obj_mapper_yml, #parse_provider_data

Methods included from ApiWrapper::AWS::ElasticIp

#describe_addresses

Methods included from AWSAgent

get_acm_agent, get_auto_scaling_agent, get_cloud_watch_agent, get_compute_agent, get_ecs_agent, get_elb_agent, get_iam_agent, get_kms_agent, get_rds_agent, get_redshift_agent, get_s3_agent

Methods included from AWSCredentialBuilder

#build_credential

Instance Method Details

#sync_resource(credential, region_code) ⇒ Object



21
22
23
24
25
26
27
# File 'lib/eaglenube/synchronizer/aws/elastic_ip.rb', line 21

def sync_resource(credential, region_code)
  remote_eips = describe_addresses(credential, region_code)
  remote_eips.each do |remote_eip|
    object_identifying_attributes, optional_attributes = yield(remote_eip)
    create_or_update(remote_eip, object_identifying_attributes, **optional_attributes)
  end
end