def host_call_plugin(self, _1, _2, plugin, method, args):
        if plugin == "xenhost" and method == "iptables_config":
            # The command to execute is a json-encoded list
            cmd_args = args.get('cmd_args', None)
            cmd = jsonutils.loads(cmd_args)
            if not cmd:
                ret_str = ''
            else:
                output = ''
                process_input = args.get('process_input', None)
                if cmd == ['ip6tables-save', '-c']:
                    output = '\n'.join(self._in6_filter_rules)
                if cmd == ['iptables-save', '-c']:
                    output = '\n'.join(self._in_rules)
                if cmd == ['iptables-restore', '-c', ]:
                    lines = process_input.split('\n')
                    if '*filter' in lines:
                        if self._test_case is not None:
                            self._test_case._out_rules = lines
                        output = '\n'.join(lines)
                if cmd == ['ip6tables-restore', '-c', ]:
                    lines = process_input.split('\n')
                    if '*filter' in lines:
                        output = '\n'.join(lines)
                ret_str = fake.as_json(out=output, err='')
            return ret_str
        else:
            return (super(FakeSessionForVMTests, self).
                    host_call_plugin(_1, _2, plugin, method, args))
insert/clear authorizations
dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/tests/unit/virt/xenapi/stubs.py/FakeSessionForFirewallTests.host_call_plugin--crossover with--dataset/ETHPy150Open mission-liao/pyswagger/pyswagger/core.py/SwaggerSecurity.update_with