]> git.proxmox.com Git - mirror_ifupdown2.git/commit - ifupdown2/addons/mstpctl.py
addons: mstpctl: ifquery -c --with-default, ignore mstpctl default attributes when...
authorNikhil <nikhil@cumulusnetworks.com>
Thu, 5 Jan 2017 22:41:42 +0000 (14:41 -0800)
committerNikhil <nikhil@cumulusnetworks.com>
Fri, 20 Jan 2017 18:42:05 +0000 (10:42 -0800)
commitd03b0695e0fa6822f70e1671bc1292eed117c15a
treea01022e97340eebacbaa374a7dcc30ced531288c
parent65beb82662576c047a281389bd663589dcba09db
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

Signed-off-by: Nikhil Gajendrakumar <nikhil@cumulusnetworks.com>
addons/mstpctl.py
ifupdownaddons/mstpctlutil.py