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

Allow arrow syntax following call to include, contain or require

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 4.8.0
    • Component/s: Language
    • Labels:
      None
    • Template:
    • Acceptance Criteria:
      Hide

      The functions include and contain should return an array of the resources that were included / contained.

      Show
      The functions include and contain should return an array of the resources that were included / contained.
    • Epic Link:
    • Story Points:
      2
    • Sprint:
      Language 2016-09-07
    • Release Notes Summary:
      The functions {{include}} and {{contain}} now returns an Array containing resource references to the included / contained resources that the function operated on. This allows further chaining of the result (for example using a dependency arrow).

      Description

      Given the following declaration:

      class { 'someclass': } ~> Resource['some::resource']
      contain 'someclass'
      

      Allow for this shortcut:

      contain('someclass') ~> Resource['some::resource']
      

      The above should be valid for all arrow operators.

      Henrik: The above was updated as the calls to the contain, include, and require functions must have the arguments in parentheses to be able to continue with an arrow.

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  qa qa
                  Reporter:
                  jmnav Jesús M. Navarro
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: