def _GetBlockDevSymlinkPath(instance_name, idx=None, uuid=None, _dir=None):
  if _dir is None:
    _dir = pathutils.DISK_LINKS_DIR

  assert idx is not None or uuid is not None

  # Using the idx is deprecated. Use the uuid instead if it is available.
  if uuid:
    ident = uuid
  else:
    ident = idx

  return utils.PathJoin(_dir,
                        ("%s%s%s" %
                         (instance_name, constants.DISK_SEPARATOR, ident)))
Returns symlink path for block device.
dataset/ETHPy150Open ganeti/ganeti/lib/backend.py/_GetBlockDevSymlinkPath