Skip to content
Snippets Groups Projects
Commit c41bd435 authored by Torbjörn Lönnemark's avatar Torbjörn Lönnemark
Browse files

Convert llnl_hostlist_expand to Puppet 4.x API

In Puppet 7, extra methods within a function definition block are no
longer permitted when using the 3.x API.

Attempting to use such functions aborts catalog compilation with:

    Error: Could not retrieve catalog from remote server:
    Error 500 on SERVER: Internal Server Error: org.jruby.exceptions.SecurityError:
    (SecurityError) Illegal method definition of method 'example_function' in source .../example-module/lib/puppet/parser/functions/example_function.rb on line XXX in legacy function.
    See https://puppet.com/docs/puppet/latest/functions_refactor_legacy.html for more information

We fix the error by updating the only function that has extra methods to
use the 4.x API.

This change drops support for Puppet 3.

https://puppet.com/docs/puppet/7/functions_refactor_legacy.html
https://puppet.com/docs/puppet/5.5/functions_legacy.html
https://puppet.com/docs/puppet/7/functions_ruby_overview.html
parent 14645e76
No related branches found
No related tags found
1 merge request!1Convert llnl_hostlist_expand to Puppet 4.x API
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment