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

meta parameter $name not useable for resource collection

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Won't Fix
    • Affects Version/s: PUP 4.2.3
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      The "free" parameter $name that every resource along with $title gets and that defaults to $title if nothing is set can't be used for resource collection (if the default value is used). Here an example:

      when using "name" during resource collection, the parameter p doesn't get updated:

      puppet apply -e 'define test ($p) { notice("$name $p") } test { "a": p => "a" } Test <| name == "a" |> { p => "aa" }'
      Notice: Scope(Test[a]): a a
      

      when using "title" during resource collection, the parameter p gets updated:

      puppet apply -e 'define test ($p) { notice("$name $p") } test { "a": p => "a" } Test <| title == "a" |> { p => "aa" }'
      Notice: Scope(Test[a]): a aa
      

      getparam(Test["a"], "name") from the stdlib module returns nothing so I suspect that if the default value is used during creation then at the moment the resource collection takes place the parameter $name isn't set anymore.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              vicinus Reinhard Vicinus
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Zendesk Support