text: import json
  import secrets
  import string
  import traceback
  
  from ceph.ceph import CommandFailed
  from tests.cephfs.cephfs_utilsV1 import FsUtils
  from tests.cephfs.cephfs_volume_management import wait_for_process
  from utility.log import Log
  
  log = Log(__name__)
  
  
  def run(ceph_cluster, **kw):
      """
      CEPH-83574028 - Ensure the path of the nfs export is displayed properly.
      Pre-requisites:
      1. Create cephfs volume
         creats fs volume create <vol_name>
      2. Create nfs cluster
         ceph nfs cluster create <nfs_name> <nfs_server>
  
      Test operation:
      1. Create cephfs nfs export
         ceph nfs export create cephfs <fs_name> <nfs_name> <nfs_export_name> path=<export_path>
      2. Verify path of cephfs nfs export
         ceph nfs export get <nfs_name> <nfs_export_name>
  
      Clean-up:
      1. Remove cephfs nfs export
      """
      try:
          tc = "CEPH-83574028"
          log.info(f"Running cephfs {tc} test case")
  
          config = kw["config"]
          build = config.get("build", config.get("rhbuild"))
  
          fs_util = FsUtils(ceph_cluster)
          clients = ceph_cluster.get_ceph_objects("client")
          client1 = clients[0]
          fs_util.prepare_clients(clients, build)
          fs_util.auth_list(clients)
          mon_node_ip = fs_util.get_mon_node_ips()
          mon_node_ip = ",".join(mon_node_ip)
          rhbuild = config.get("rhbuild")
          nfs_servers = ceph_cluster.get_ceph_objects("nfs")
          nfs_server = nfs_servers[0].node.hostname
          nfs_name = "cephfs-nfs"
          clients = ceph_cluster.get_ceph_objects("client")
          client1 = clients[0]
          client1.exec_command(sudo=True, cmd="ceph mgr module enable nfs")
          out, rc = client1.exec_command(
              sudo=True, cmd=f"ceph nfs cluster create {nfs_name} {nfs_server}"
          )
          if wait_for_process(client=client1, process_name=nfs_name, ispresent=True):
              log.info("ceph nfs cluster created successfully")
          else:
              raise CommandFailed("Failed to create nfs cluster")
          nfs_export_name = "/export_" + "".join(
              secrets.choice(string.digits) for i in range(3)
          )
          export_path = "/"
          fs_name = "cephfs"
          if "5.0" in rhbuild:
              client1.exec_command(
                  sudo=True,
                  cmd=f"ceph nfs export create cephfs {fs_name} {nfs_name} "
                  f"{nfs_export_name} path={export_path}",
              )
          else:
              client1.exec_command(
                  sudo=True,
                  cmd=f"ceph nfs export create cephfs {nfs_name} "
                  f"{nfs_export_name} {fs_name} path={export_path}",
              )
          out, rc = client1.exec_command(sudo=True, cmd=f"ceph nfs export ls {nfs_name}")
          output = out.read().decode()
          output.split()
          if nfs_export_name not in output:
              raise CommandFailed("Failed to create nfs export")
  
          log.info("ceph nfs export created successfully")
          out, rc = client1.exec_command(
              sudo=True, cmd=f"ceph nfs export get {nfs_name} {nfs_export_name}"
          )
          output = json.loads(out.read().decode())
          export_get_path = output["path"]
          if export_get_path != export_path:
              log.error("Export path is not correct")
              return 1
  
          log.info("Test completed successfully")
          return 0
      except Exception as e:
          log.info(e)
          log.info(traceback.format_exc())
          return 1
      finally:
          log.info("Cleaning up")
          client1.exec_command(
              sudo=True,
              cmd=f"ceph nfs export delete {nfs_name} {nfs_export_name}",
              check_ec=False,
          )
  