fuel-plugin-cinder-netapp/deployment_scripts/puppet/modules/plugin_cinder_netapp/lib/puppet/parser/functions/nfs-share.rb

14 lines
335 B
Ruby

module Puppet::Parser::Functions
newfunction(:get_nfs_shares, :type => :rvalue) do |args|
data = args[0]
nb_share = data['nb_share'].to_i
ip = data['nfs_server_ip']
shares = ''
nb_share.downto(1) { |share|
shares += ip + ':' + data['nfs_server_share' + share.to_s] + "\n"
}
return shares
end
end