Module: Eaglenube::Synchronizer::AWS::Volume::VolumeSyncMethods

Includes:
ApiWrapper::AWS::Volume, CloudObjectMapper::AWS
Defined in:
lib/eaglenube/synchronizer/aws/volume.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::Volume

#describe_volumes

Instance Method Details

#sync_resource(credential, region_code, &_block) ⇒ Object



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

def sync_resource(credential, region_code, &_block)
  remote_volumes = describe_volumes(credential, region_code)
  remote_volumes.each do |remote_volume|
    object_identifying_attributes, optional_attributes = yield(remote_volume)
    create_or_update(remote_volume, object_identifying_attributes, **optional_attributes)
  end
end