Module: Eaglenube::CloudObjectMapper::AWS
- Included in:
- Synchronizer::AWS::AcmCertificate::AcmSyncMethods, Synchronizer::AWS::Database::AcmSyncMethods, Synchronizer::AWS::DbSnapshot::DbSnapshotSyncMethods, Synchronizer::AWS::ElasticIp::EipSyncMethods, Synchronizer::AWS::IamCertificate::IamCertificateSyncMethods, Synchronizer::AWS::KeyPair::KeyPairSyncMethods, Synchronizer::AWS::Loadbalancer::LbSyncMethods, Synchronizer::AWS::SecurityGroup::SecurityGroupSyncMethods, Synchronizer::AWS::Snapshot::SnapshotSyncMethods, Synchronizer::AWS::Subnet::SubnetSyncMethods, Synchronizer::AWS::Volume::VolumeSyncMethods, Synchronizer::AWS::Vpc::VpcSyncMethods
- Defined in:
- lib/eaglenube/cloud_object_mapper/aws.rb
Instance Method Summary collapse
- #cloud_obj_mapper(**options) ⇒ Object
- #cloud_obj_mapper_yml(file_path) ⇒ Object
- #parse_provider_data(obj) ⇒ Object
Instance Method Details
#cloud_obj_mapper(**options) ⇒ Object
19 20 21 |
# File 'lib/eaglenube/cloud_object_mapper/aws.rb', line 19 def cloud_obj_mapper(**) @attr_map = end |
#cloud_obj_mapper_yml(file_path) ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/eaglenube/cloud_object_mapper/aws.rb', line 8 def cloud_obj_mapper_yml(file_path) raise StandardError, "#{file_path} not found." unless File.exist?(file_path) @attr_map = begin YAML.safe_load(File.open(file_path)).symbolize_keys rescue StandardError => e puts e. {} end end |
#parse_provider_data(obj) ⇒ Object
23 24 25 |
# File 'lib/eaglenube/cloud_object_mapper/aws.rb', line 23 def parse_provider_data(obj) @attr_map.transform_values { |v| eval v } end |