[PUP-6400] lookup cli has no way to set arbitrary scope values Created: 2016/06/10 Updated: 2019/04/04
|Affects Version/s:||PUP 4.5.1|
|Remaining Estimate:||Not Specified|
|Time Spent:||Not Specified|
|Original Estimate:||Not Specified|
When constructing hierarchies it's best to use $trusted wherever possible and there are legit use cases for using random in scope vars.
The old CLI let you specify arbitrary scope which would be used to satisfy testing these on the CLI, with new lookup this is pretty hard/impossible.
It lets you supply facts from a file which then is only accessible as facts.foo for example, no way to do trusted or random vars.
I might have missed a obvious way to achieve this so this ticket could be a non issue but could not find it.
|Comment by Henrik Lindberg [ 2016/06/10 ]|
You should be able to feed in $trusted stuff by having the fact 'trusted' set to the correct (expected) values. (I am unsure if we tested that though, it may work because we do get $trusted as a node parameter in some cases, and IIRC, that is how we deal with the facts given on the CLI). Love to hear if that works or not.
For arbitrary variables; since that is supported at runtime, the CLI should support those too. (Not having support for that is an oversight). The easiest is to add yet another flag that accepts a reference to a file with variables, or we need to redesign the options to accept a combination of facts and variables in one and the same file. Not sure what is best (also considering backwards compatibility).
|Comment by Eric Sorenson [ 2016/07/15 ]|
R.I.Pienaar do henrik's suggestions address your concerns? sounds like there is a way to achieve this - pls put the ticket back to me iff not.
|Comment by R.I.Pienaar [ 2016/07/16 ]|
Eric Sorenson no can't say I got this to work tbh
Doesn't seem to be using these facts. But apart from that Henrik Lindberg also identified what looks like some feature work that's needed in his reply