'Remove named chain.
This removal "cascades". All rule in the chain are removed, as are
all rules in other chains that jump to it.
If the chain is not found, this is merely logged.'

def remove_chain(self, name, wrap=True):

    if wrap:
        chain_set = self.chains
    else:
        chain_set = self.unwrapped_chains
    if (name not in chain_set):
        LOG.warning(_LW('Attempted    to    remove    chain    %s    which    does    not    exist'), name)
        return
    self.dirty = True
    if (not wrap):
        self.remove_chains.add(name)
    chain_set.remove(name)
    if (not wrap):
        self.remove_rules += [r for r in self.rules if (r.chain == name)]
    self.rules = [r for r in self.rules if (r.chain != name)]
    if wrap:
        jump_snippet = ('-j    %s-%s' % (binary_name, name))
    else:
        jump_snippet = ('-j    %s' % (name,))
    if (not wrap):
        self.remove_rules += [r for r in self.rules if (jump_snippet in r.rule)]
    self.rules = [r for r in self.rules if (jump_snippet not in r.rule)]
