use of org.alien4cloud.alm.deployment.configuration.flow.modifiers.matching.PolicyMatchingConfigAutoSelectModifier in project alien4cloud by alien4cloud.
the class PolicyMatchingSubstitutionService method getModifierListWithSelectionAction.
private List<ITopologyModifier> getModifierListWithSelectionAction(SetMatchedPolicyModifier matchedModifier) {
List<ITopologyModifier> modifierList = flowExecutor.getDefaultFlowModifiers();
PolicyMatchingCompositeModifier matchingModifier = (PolicyMatchingCompositeModifier) modifierList.stream().filter(modifier -> modifier instanceof PolicyMatchingCompositeModifier).findFirst().orElseThrow(() -> new IllegalArgumentException("Unexpected exception in deployment flow to update node substitution; unable to find the master node matching modifier to inject selection action modifier."));
// inject the SetMatchedNodeModifier into the nodeMatchingModifiers, just after policyMatchingConfigAutoSelectModifier
matchingModifier.addModifierAfter(matchedModifier, policyMatchingConfigAutoSelectModifier);
return modifierList;
}
Aggregations