addons: mstpctl: ifquery -c --with-default, ignore mstpctl default attributes when stp is off
Ticket: CM-13779
Reviewed By: roopa, satish, julien
Testing Done: testing the config given in the CM
mstpctl showportdetail <bridge> command won't output anything when
bridge-stp is off, therefore ignore mstpctl default attributes during
ifquery -c --with-defaults
This patch also consistently updates bridge and bridge port cache
at the same time.
Earlier bridge and bridge port cache were not consistent
because of the early return condition
attrs = MSTPAttrsCache.get(bridgename)
if attrs:
return attrs
If either of bridge port cache and bridge cache is updated, function used to
return inconsistent cache values