(This was suggested by Nick Anderson and was recently asked on help-cfengine)
It's currently easy to test for @net_x_y_z@ to see if the subnet is @x.y.z@. But there's no easy way to ask "what subnet did cf-agent detect, that ended up in the @net_x_y_z@ class."
The core problem is that we can't trace the provenance of the "subnet" piece of knowledge, and we don't know that it determined the subnet to be @x.y.z@.
The solution is in my opinion surprisingly simple. In addition to defining the class @net_x_y_z@, the agent should also fill in a special array:
@sys.knowledge_trace[subnet] string => "net_x_y_z"@
This is cheap and easy, and should not be hard to implement.
Feature use case:
- map hard classes to variables (often asked on help-cfengine)
- provide a full list of the hard classes currently defined
- structure the system knowledge better
Current planned features:
- implement the array suggested above
- naming of array keys has to be systematic and not ad-hoc
Cross feature mapping:
Demoed for externals:
- manual update