'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):

    name = get_chain_name(name, wrap)
    chain_set = self._select_chain_set(wrap)
    if (name not in chain_set):
        LOG.debug('Attempted    to    remove    chain    %s    which    does    not    exist', name)
        return
    chain_set.remove(name)
    if (not wrap):
        self.remove_chains.add(name)
        jump_snippet = ('-j    %s' % name)
        self.remove_rules += [str(r) for r in self.rules if ((r.chain == name) or (jump_snippet in r.rule))]
    else:
        jump_snippet = ('-j    %s-%s' % (self.wrap_name, name))
    self.rules = [r for r in self.rules if ((r.chain != name) and (jump_snippet not in r.rule))]
