def _create_lswitches(self, lswitch_create_args, num_switches=-1):
        self.RESOURCE_NAME_FORMAT = "lswitch_XXXXXX_XXXXXX"

        if (num_switches == -1):
            num_switches = lswitch_create_args.get("amount", 1)
        batch = lswitch_create_args.get("batch", num_switches)

        start_cidr = lswitch_create_args.get("start_cidr", "")
        if start_cidr:
            start_cidr = netaddr.IPNetwork(start_cidr)

        mcast_snoop = lswitch_create_args.get("mcast_snoop", "true")
        mcast_idle = lswitch_create_args.get("mcast_idle_timeout", 300)
        mcast_table_size = lswitch_create_args.get("mcast_table_size", 2048)

        LOG.info("Create lswitches method: %s" % self.install_method)
        ovn_nbctl = self._get_ovn_controller(self.install_method)
        ovn_nbctl.enable_batch_mode()

        flush_count = batch
        lswitches = []
        for i in range(num_switches):
            name = self.generate_random_name()
            if start_cidr:
                cidr = start_cidr.next(i)
                name = "lswitch_%s" % cidr
            else:
                name = self.generate_random_name()

            other_cfg = {
                'mcast_snoop': mcast_snoop,
                'mcast_idle_timeout': mcast_idle,
                'mcast_table_size': mcast_table_size
            }

            lswitch = ovn_nbctl.lswitch_add(name, other_cfg)
            if start_cidr:
                lswitch["cidr"] = cidr

            LOG.info("create %(name)s %(cidr)s" % \
                      {"name": name, "cidr": lswitch.get("cidr", "")})
            lswitches.append(lswitch)

            flush_count -= 1
            if flush_count < 1:
                ovn_nbctl.flush()
                flush_count = batch

        ovn_nbctl.flush() # ensure all commands be run
        ovn_nbctl.enable_batch_mode(False)
        return lswitches