in cookbooks/aws-parallelcluster-environment/recipes/config/update_shared_storages.rb [67:94]
def get_efs(action)
if action == UNMOUNT_ACTION
in_shared_storages_mapping = node['cluster']['shared_storages_mapping']
not_in_shared_storages_mapping = node['cluster']['update_shared_storages_mapping']
elsif action == MOUNT_ACTION
in_shared_storages_mapping = node['cluster']['update_shared_storages_mapping']
not_in_shared_storages_mapping = node['cluster']['shared_storages_mapping']
end
shared_dir_array = []
efs_fs_id_array = []
efs_encryption_in_transit_array = []
efs_iam_authorization_array = []
efs_access_point_id_array = []
unless in_shared_storages_mapping["efs"].nil?
in_shared_storages_mapping["efs"].each do |storage|
next unless not_in_shared_storages_mapping["efs"].nil? || !not_in_shared_storages_mapping["efs"].include?(storage)
shared_dir_array.push(storage["mount_dir"])
efs_fs_id_array.push(storage["efs_fs_id"])
efs_encryption_in_transit_array.push(String(storage["efs_encryption_in_transit"]))
efs_iam_authorization_array.push(String(storage["efs_iam_authorization"]))
efs_access_point_id_array.push(String(storage["efs_access_point_id"]))
end
end
[shared_dir_array, efs_fs_id_array, efs_encryption_in_transit_array, efs_iam_authorization_array, efs_access_point_id_array]
end