Since version 2.0 of checkmk the service check “ESX Snapshots” only has the metrics age and age_oldest if the threshold parameters are set.
if params.get('age') else None added in this line?
I think the easy answer is - the code was ported from someone without real experience in daily usage of an ESX system. If i write a check or port a check for a system i don’t know, most time the check is missing some important things.
In the end the code is strange and makes no sense this way.
The thing is that the metric did not have this limitation in checkmk 1.6.
if statement was added in 2.0 and I cannot think of a reason to do this.