Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #7126: Add a new system variable for the \"rudder_directives\" bundle #917

Conversation

fanf
Copy link
Member

@fanf fanf commented Aug 25, 2015

SystemVariable(systemVariableSpecService.get("INPUTLIST"), Seq(inputs.distinct.mkString("\"", "\",\"", "\"")))
, SystemVariable(systemVariableSpecService.get("BUNDLELIST"), Seq(bundleSeq.map( _._2.name).mkString(", ", ", ", "")))
, SystemVariable(systemVariableSpecService.get("RUDDER_DIRECTIVES_SEQUENCE"),
Seq(bundleSeq.map { case (promisee, bundle) => s""" "${promisee} usebundle => ${bundle.name};" """}.mkString( "\n"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be promiser, not promisee. Promisee is a whole different concept in CFEngine. See http://syslog.me/2013/05/21/the-value-of-the-promisee-in-cfengine-promises/.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should indeed be called promiser

Plus, you have invalid quoting, the line should probably be
"${promiser}" usebundle => ${bundle.name};

@fanf
Copy link
Member Author

fanf commented Aug 27, 2015

PR updated

@fanf fanf force-pushed the arch_7126/add_a_new_system_variable_for_the_rudder_directives_bundle branch from 3aabc5c to 1d1145a Compare August 27, 2015 16:35
// We need to remove zero-length bundle name from the bundlesequence (like, if there is no ncf bundles to call)
// to avoid having two successives commas in the bundlesequence
val techniqueBundles = technique.bundlesequence.flatMap { bundle =>
if(bundle.name.trim.size > 0) {
Some(bundle)
Some((technique, promisee, bundle))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should still be promiser

@fanf
Copy link
Member Author

fanf commented Aug 28, 2015

PR updated

@fanf fanf force-pushed the arch_7126/add_a_new_system_variable_for_the_rudder_directives_bundle branch from 1d1145a to c4eb79f Compare August 28, 2015 13:51
@fanf
Copy link
Member Author

fanf commented Aug 28, 2015

PR updated

@fanf fanf force-pushed the arch_7126/add_a_new_system_variable_for_the_rudder_directives_bundle branch from c4eb79f to db0a3dd Compare August 28, 2015 13:55
ncharles added a commit that referenced this pull request Aug 31, 2015
…_for_the_rudder_directives_bundle

Fixes #7126: Add a new system variable for the \"rudder_directives\" bundle
@ncharles ncharles merged commit 6f6a690 into Normation:master Aug 31, 2015
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants