in cookbooks/aws-parallelcluster-environment/recipes/config/update_shared_storages.rb [95:124]
def get_fsx(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
fsx_fs_id_array = []
fsx_fs_type_array = []
fsx_shared_dir_array = []
fsx_dns_name_array = []
fsx_mount_name_array = []
fsx_volume_junction_path_array = []
unless in_shared_storages_mapping["fsx"].nil?
in_shared_storages_mapping["fsx"].each do |storage|
next unless not_in_shared_storages_mapping["fsx"].nil? || !not_in_shared_storages_mapping["fsx"].include?(storage)
fsx_fs_id_array.push(storage["fsx_fs_id"])
fsx_fs_type_array.push(storage["fsx_fs_type"])
fsx_shared_dir_array.push(storage["mount_dir"])
fsx_dns_name_array.push(storage["fsx_dns_name"])
fsx_mount_name_array.push(storage["fsx_mount_name"])
fsx_volume_junction_path_array.push(storage["fsx_volume_junction_path"])
end
end
[fsx_fs_id_array, fsx_fs_type_array, fsx_shared_dir_array, fsx_dns_name_array, fsx_mount_name_array, fsx_volume_junction_path_array]
end