def empty_chain(self, chain, wrap=True):
        chained_rules = [rule for rule in self.rules
                              if rule.chain == chain and rule.wrap == wrap]
        if chained_rules:
            self.dirty = True
        for rule in chained_rules:
            self.rules.remove(rule)
Remove all rules from a chain.
dataset/ETHPy150Open openstack/nova/nova/network/linux_net.py/IptablesTable.empty_chain