public final VersionDefinitionXml getVersionDefinitionXml(UpgradeCheckRequest request) throws AmbariException {
    RepositoryVersion repositoryVersion = request.getTargetRepositoryVersion();
    RepositoryVersionEntity entity = repositoryVersionDaoProvider.get().findByPK(
        repositoryVersion.getId());

    try {
      VersionDefinitionXml vdf = entity.getRepositoryXml();
      return vdf;
    } catch (Exception exception) {
      throw new AmbariException("Unable to run upgrade checks because of an invalid VDF",
          exception);
    }
  }
Gets a de-serialized {@link VersionDefinitionXml} from the repository for
this upgrade.

@param request
         the upgrade check request.
@return the VDF XML
@throws AmbariException
ambari-server/src/main/java/org/apache/ambari/server/state/CheckHelper.java