protected Task resolveTask(UpgradeContext context, ProcessingComponent pc) {
    if (null != pc.tasks && 1 == pc.tasks.size()) {
      if (context.isScoped(pc.tasks.get(0).scope)) {
        return pc.tasks.get(0);
      }
    }

    return null;
  }
The upgrade packs are written such that there is one and only one upgrade element
for a component, all other directives go in (pre|post)-(upgrade|downgrade) elements.
@param pc the processing component
@return the single task, or {@code null} if there is none
ambari-server/src/main/java/org/apache/ambari/server/stack/upgrade/orchestrate/StageWrapperBuilder.java