Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-6948

generate() should allow calls with variable number of arguments

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Normal
    • Resolution: Won't Do
    • Affects Version/s: PUP 4.8.1
    • Fix Version/s: None
    • Component/s: Language
    • Labels:
      None
    • Template:
    • Team:
      Puppet Developer Experience
    • Sprint:
      Forge - To Accept
    • QA Risk Assessment:
      Needs Assessment

      Description

      It would often be useful to allow generate() calls with a variable number of arguments, e.g. when generate is used to generate file content containing multiple entries (e.g. one per user or one per server) with the identifiers for the exact content specified on the commandline.

      One option to achieve this would be to allow generate to take an array parameter value which would be treated as if length(array) individual parameters had been passed in its place.

      Another option would be to create a more general apply construct in the language (not sure if even a built-in function could achieve that since function names are probably not first class entities in the puppet language) that allows calling any function by name and an array of parameters.

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                mhoermann Matthias Hörmann
                Reporter:
                mhoermann Matthias Hörmann
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support