Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-569

string contexts for easier expressions

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Done
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.7.0
    • Component/s: Parsing
    • Labels:
      None

      Description

      Currently, contexts must be expressed in "naked" form:

      x.y|z::
        promise;
      

      but it's often convenient to express the context through a variable, which is exactly what the ifvarclass attribute does.

      It would be terrific if the parser allowed strings with variables in the context expressions as well; as far as the language goes, this is not new functionality but simply syntactic sugar.

      If a user specifies both a string context and an ifvarclass attribute, the outcome should simply be the AND of the two conditions. So there's no ambiguity and this change is fully backwards compatible with all current CFE code.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                a10003 Eystein Maloy Stenberg
                Reporter:
                jiraadmin Old User (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel