private OrchestrationOptions getOrchestrationOptions(AmbariMetaInfo metaInfo, UpgradePack pack) {

    // !!! only for testing
    if (null == pack) {
       return null;
    }

    String className = pack.getOrchestrationOptions();

    if (null == className) {
      return null;
    }

    StackId stackId = pack.getOwnerStackId();

    try {
      StackInfo stack = metaInfo.getStack(stackId);

      return stack.getLibraryInstance(className);

    } catch (Exception e) {
      LOG.error(String.format("Could not load orchestration options for stack {}: {}",
          stackId, e.getMessage()));
      return null;
    }
  }
Loads the orchestration options for the context

@param metaInfo
         the ambari meta-info used to load custom classes
@param pack
         the upgrade pack
@return
         the orchestration options instance.  Can return {@code null}.
ambari-server/src/main/java/org/apache/ambari/server/stack/upgrade/orchestrate/UpgradeContext.java