diff --git a/deployment_scripts/puppet/modules/plugin_purestorage_cinder/lib/puppet/parser/functions/get_random_id.rb b/deployment_scripts/puppet/modules/plugin_purestorage_cinder/lib/puppet/parser/functions/get_random_id.rb deleted file mode 100644 index 236b1f6..0000000 --- a/deployment_scripts/puppet/modules/plugin_purestorage_cinder/lib/puppet/parser/functions/get_random_id.rb +++ /dev/null @@ -1,18 +0,0 @@ -# Custom function to generate a random hex string of length arg[0]. -# -# This is used to ensure we get unique tenant and user IDs that -# are required for the glance image-cache for cinder - -module Puppet::Parser::Functions - newfunction(:get_random_id, :type => :rvalue, :doc => "returns a random hex string of length args[0]") do |args| - raise(Puppet::ParseError, "get_random_id(): Wrong number of arguments " + - "given (#{args.size} for 1)") if args.size != 1 - numbers = (0..9).to_a - alpha = ('a'..'f').to_a - length = args[0].to_i - CHARS = (alpha + numbers) - id_sub = CHARS.sort_by { rand }.join[0...length] - id = id_sub + id_sub - return id - end -end