puppetlabs / puppetlabs-stdlib

Puppet Labs Standard Library module
http://forge.puppetlabs.com/puppetlabs/stdlib
Apache License 2.0
348 stars 580 forks source link

Rewrite fqdn_rand_string() as a Puppet 4.x function #1343

Closed smortex closed 1 year ago

smortex commented 1 year ago

The 3.x function rely on is_integer() which is deprecated. Rewrite it using the more modern puppet 4.x function to rely on data types for better parameters validation.

alexjfisher commented 1 year ago

IMO all non core puppet functions should be namespaced. My approach has been to create a non-namespace deprecated shim that we can remove at a later date.

smortex commented 1 year ago

@alexjfisher hum, yeah, maybe we can do this. For now, I want to remove the deprecated functions so need a backward compatible way to use fqdn_rand_string() in order to open another PR I am preparing ATM.

When these are merged, we can namespace the function and add a deprecation warning in the non-namespaced version in another PR if you are okay with this?