def configure_next_batch_of_vlans(self, switch_ip):
next_range = self._pop_vlan_range(<EOL>switch_ip, const.CREATE_VLAN_BATCH)<EOL>if next_range:<EOL><INDENT>try:<EOL><INDENT>self.driver.set_all_vlan_states(<EOL>switch_ip, next_range)<EOL><DEDENT>except Exception:<EOL><INDENT>with excutils.save_and_reraise_exception():<EOL><INDENT>LOG.error("<STR_LIT>"<EOL>"<STR_LIT>",<EOL>{'<STR_LIT>': switch_ip})<EOL>self._save_switch_vlan_range(switch_ip, [])<EOL><DEDENT><DEDENT><DEDENT>vxlan_range = self._get_switch_vxlan_range(switch_ip)<EOL>if vxlan_range:<EOL><INDENT>try:<EOL><INDENT>self._restore_vxlan_entries(switch_ip, vxlan_range)<EOL><DEDENT>except Exception:<EOL><INDENT>with excutils.save_and_reraise_exception():<EOL><INDENT>LOG.error("<STR_LIT>"<EOL>"<STR_LIT>",<EOL>{'<STR_LIT>': switch_ip})<EOL>self._save_switch_vxlan_range(switch_ip, [])<EOL><DEDENT><DEDENT><DEDENT>if (not self._get_switch_vlan_range(switch_ip) and<EOL>not self._get_switch_vxlan_range(switch_ip)):<EOL><INDENT>self.set_switch_ip_and_active_state(<EOL>switch_ip, const.SWITCH_ACTIVE)<EOL>LOG.info("<STR_LIT>"<EOL>"<STR_LIT>",<EOL>{'<STR_LIT>': switch_ip})<EOL><DEDENT>else:<EOL><INDENT>LOG.debug(("<STR_LIT>"<EOL>"<STR_LIT>"),<EOL>{'<STR_LIT>': switch_ip})<EOL><DEDENT>
Get next batch of vlans and send them to Nexus.