code: def _restore_vxlan_entries(self, switch_ip, vlans):
          
  
          count = 1
          conf_str = ''
          vnsegment_sent = 0
          path_str, conf_str = self.driver.start_create_vlan()
          # At this time, this will only configure vni information when needed
          while vnsegment_sent < const.CREATE_VLAN_BATCH and vlans:
              vlan_id, vni = vlans.pop(0)
              # Add it to the batch
              conf_str = self.driver.get_create_vlan(
                  switch_ip, vlan_id, vni, conf_str)
              # batch size has been met
              if (count == const.CREATE_VLAN_SEND_SIZE):
                  conf_str = self.driver.end_create_vlan(conf_str)
                  self.driver.send_edit_string(switch_ip, path_str, conf_str)
                  vnsegment_sent += count
                  conf_str = ''
                  count = 1
              else:
                  count += 1
  
          # batch size was not met
          if conf_str:
              vnsegment_sent += count
              conf_str = self.driver.end_create_vlan(conf_str)
              self.driver.send_edit_string(switch_ip, path_str, conf_str)
              conf_str = ''
  
          LOG.debug("Switch %s VLAN vn-segment replay summary: %d",
                    switch_ip, vnsegment_sent)
docs: Restore vxlan entries on a Nexus switch.