def _gen_ipset_rules(self, temp, bundles):

        self._install_ipset(constants.IPSET_PROD)
        temp.write("%s\n" % self._gen_ipset(constants.IPSET_STAGING))
        ignore_str = "-! "
        if self.legacy_ipset:
            ignore_str = ""
        for bundle in bundles:
            temp.write("%s-A %s %s\n" % (ignore_str, constants.IPSET_STAGING, bundle.filter_ip(self._is_vpc)))
        temp.write("COMMIT\n")
        temp.flush()
Callables added with C{addCleanup} should be called before C{tearDown}
dataset/ETHPy150Open facebookarchive/neti/neti/iptables.py/IPtables._gen_ipset_rules--crossover with--dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/trial/test/test_tests.py/TestAddCleanup.test_addCleanupCalledInReverseOrder