public List<IntermediateStack> getIntermediateStacks() {
    return intermediateStacks;
  }
Gets a list of stacks which are between the current stack version and the
target stack version inclusive. For example, if upgrading from HDP-2.2 to
HDP-2.4, this should include HDP-2.3 and HDP-2.4.
<p/>
This method is used to combine the correct configuration packs for a
specific upgrade from
{@link AmbariMetaInfo#getConfigUpgradePack(String, String)}.

@return a list of intermediate stacks (target stack inclusive) or
        {@code null} if none.
ambari-server/src/main/java/org/apache/ambari/server/stack/upgrade/UpgradePack.java