Bug #12743
closedId of the ncf technique parameter used when generating Rudder technique parameter instead of it's name
Description
Context:¶
A ncf Technique parameter is composed of two things an Id (auto generated) and a name (set by the user in technique editor)
That parameter is translated into a Rudder Technique Variable, composed of a name (used as an id, apart the case described below which cause a bug for now ... ) a description (display by UI) and a LongDescription( ui, tooltip).
Ncf parameter | Rudder Variable |
---|---|
id | name |
name | description |
N/A | Long description |
The bug:¶
That variable name is used to generate parameter in the bundle sequence (generation mode is separated with parameters), the name of the parameter is mixed with value set of in the Directive to define parameters.
This as no impact on cfengine agent, because the name is not used, using only the value form the Directive parameter a set in the right order
But on dsc agent, parameters are passed by name, so we set the name of the parameter to be an id, which does not work ...
Let say we have:
A ncf technique "install basic package", with a parameter "package_name" with id "93c5a94f-ce2d-438d-bd6c-5fc29a6119d0"
It will be translated in a Rudder technique with a parameter/Variable of name "93c5a94f-ce2d-438d-bd6c-5fc29a6119d0" with description "package_name"
If we define a Directive based on that technique with our parameter set to "vim",
When generating a bundle sequence for that Directive, it will build a list of parameter for the bundle with the name of the parameter "93c5a94f-ce2d-438d-bd6c-5fc29a6119d0" and the value from the Directive "vim"
This will lead for cfengine agent to the follwong bundle call, ignoring that fact that the name of the parameter is not correct
install_basic_package("vim")
But for dsc agent it will be:
InstallBasicPackage -93c5a94f-ce2d-438d-bd6c-5fc29a6119d0 "vim"
Which does not work :(
What we want is:
InstallBasicPackage -PackageName "vim"
ideas:¶
- Use Rudder technique variable description instead of its name when generated bundle sequence parameter
- Use name of the ncf technique parameter as name for Rudder Technique variable