def delete_bridge_dev(dev):
    if device_exists(dev):
        try:
            utils.execute('ip', 'link', 'set', dev, 'down', run_as_root=True)
            utils.execute('brctl', 'delbr', dev, run_as_root=True)
        except processutils.ProcessExecutionError:
            with excutils.save_and_reraise_exception():
                LOG.error(_LE("Failed removing bridge device: '%s'"), dev)


# Similar to compute virt layers, the Linux network node
# code uses a flexible driver model to support different ways
# of creating ethernet interfaces and attaching them to the network.
# In the case of a network host, these interfaces
# act as gateway/dhcp/vpn/etc. endpoints not VM interfaces.
Delete a network bridge.
dataset/ETHPy150Open openstack/nova/nova/network/linux_net.py/delete_bridge_dev