code: def enable_vxlan_feature(self, nexus_host, nve_int_num, src_intf):
          
  
          # Configure the "feature" commands and NVE interface
          # (without "member" subcommand configuration).
          # The Nexus 9K will not allow the "interface nve" configuration
          # until the "feature nv overlay" command is issued and installed.
          # To get around the N9K failing on the "interface nve" command
          # send the two XML snippets down separately.
  
          starttime = time.time()
  
          # Do CLI 'feature nv overlay'
          self.send_edit_string(nexus_host, snipp.PATH_VXLAN_STATE,
                                (snipp.BODY_VXLAN_STATE % "enabled"))
  
          # Do CLI 'feature vn-segment-vlan-based'
          self.send_edit_string(nexus_host, snipp.PATH_VNSEG_STATE,
                                (snipp.BODY_VNSEG_STATE % "enabled"))
  
          # Do CLI 'int nve1' to Create nve1
          self.send_edit_string(
              nexus_host,
              (snipp.PATH_NVE_CREATE % nve_int_num),
              (snipp.BODY_NVE_CREATE % nve_int_num))
  
          # Do CLI 'no shut
          #         source-interface loopback %s'
          # beneath int nve1
          self.send_edit_string(
              nexus_host,
              (snipp.PATH_NVE_CREATE % nve_int_num),
              (snipp.BODY_NVE_ADD_LOOPBACK % ("enabled", src_intf)))
          self.capture_and_print_timeshot(
              starttime, "enable_vxlan",
              switch=nexus_host)
docs: Enable VXLAN on the switch.