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

resource_types response has AST for parameters' default values

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • PUP 4.1.0
    • PUP 3.8.2, PUP 4.2.0
    • None
    • 1
    • Language 2015-06-24
    • Bug Fix

    Description

      In Puppet 3.x, the resource_types response would contain the unevaluated code assigned to a parameter's default value. For example, if a class were declared as follows:

      class foo($bar=["1", "2"]) {
      }
      

      Then the class's representation in the resource_types response would include:

      "parameters": "[\"1\", \"2\"]"
      

      In Puppet 4.1.0 and above (and probably 4.0.0 as well, though I haven't tested that), the default value is the abstract syntax tree representation rather than the code as written. For the class defined above, the default value in the resource_types response is now:

      "parameters": "([] '1' '2')"
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dan.lidral-porter Dan Lidral-Porter
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support