def _find_chain_name(self, mac):
        """Find a rule associated with a given mac."""

        ipt_cmd = ['iptables', '-t', 'filter', '-S']
        cmdo = dsl.execute(ipt_cmd, root_helper=self._root_helper,
                           log_output=False)
        for o in cmdo.split('\n'):
            if mac in o.lower():
                chain = o.split()[1]
                LOG.info(_LI('Find %(chain)s for %(mac)s.'),
                         {'chain': chain, 'mac': mac})
                return chain
dataset/ETHPy150Open openstack/networking-cisco/networking_cisco/apps/saf/agent/iptables_driver.py/IptablesDriver._find_chain_name/original