Sometimes when the driver is trying to delete a BridgeDomain it is not empty. This then results in a InconsistentModelException with a cli error saying something like:
<bad-cli>
<bad-command>no bridge-domain 2157</bad-command>
<error-location>17</error-location>
<parser-response>Bridge-domain 2157 cannot be deleted because it is not empty (3 members)
</parser-response>
<parser-context>no bridge-domain 2157</parser-context>
</bad-cli>
In most cases we expect the bridge to be cleared out (as the ports are normally deleted before the network is deleted), but sometimes that is not the case, e.g. when the delete is interrupted because the device locked its config for a sync. Therefore we now add a postflight() method to our bridge that is called before the bridge is deleted, where we fetch the bridge from the device and delete all members.
Sometimes when the driver is trying to delete a BridgeDomain it is not empty. This then results in a InconsistentModelException with a cli error saying something like:
In most cases we expect the bridge to be cleared out (as the ports are normally deleted before the network is deleted), but sometimes that is not the case, e.g. when the delete is interrupted because the device locked its config for a sync. Therefore we now add a postflight() method to our bridge that is called before the bridge is deleted, where we fetch the bridge from the device and delete all members.