protected UpgradeContext getUpgradeContext(Cluster cluster) {
    UpgradeEntity upgrade = cluster.getUpgradeInProgress();
    UpgradeContext upgradeContext = m_upgradeContextFactory.create(cluster, upgrade);
    return upgradeContext;
  }
Gets an initialized {@link UpgradeContext} for the in-progress upgrade.
ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/AbstractUpgradeServerAction.java