Architecture #6101
closedWe should be able to call ncf generic methods more than once
Description
Some ncf methods break their reporting if they are called more than once.
This is because we do not identify properly parameters that describe the object we are working on from parameters that describe its state.
For now, the first parameter is taken as a key for the object and the rest as a state.
But this doesn't work for everything. For example, file_ensure_lines_present takes 2 parameters : file and lines.
They both describe the object : those lines in this file; the state is described here in the function name : be present.
So we should be able to call this function twice with the same file but with different lines.
This impacts the way we do reporting, since we use the first parameter as the reporting key.
And we must consider the interaction between cfengine and ncf generic method signature since cfengine may decide to not call twice a generic method with the same parameters.
Updated by Alexis Mousset over 8 years ago
- Is duplicate of Bug #4797: When using multiple times the same generic method on the same object, the reporting will be broken for all of them added
Updated by Alexis Mousset almost 8 years ago
- Target version changed from 0.x to master
Updated by Alexis Mousset almost 8 years ago
- Related to Architecture #7155: Stable class identifier added
Updated by Alexis Mousset almost 8 years ago
- Status changed from New to Rejected
It will be fixed by the new class prefix in #7155, closing.
Updated by Alexis Mousset over 2 years ago
- Target version changed from master to ncf-1.2
Updated by Alexis Mousset over 2 years ago
- Project changed from 41 to Rudder
- Category changed from Generic methods to Generic methods