@Override
    public List<AdaptationCommand> plan(ContainerRoot currentModel, ContainerRoot targetModel)
            throws KevoreeAdaptationException {
        final List<AdaptationCommand> commands = super.plan(currentModel, targetModel);
        final List<AdaptationCommand> dockerCommands = new ModelHelper(context.getNodeName(), docker, factory)
                .model2docker(currentModel, targetModel);
        Log.debug("=== Docker commands ===");
        dockerCommands.forEach((cmd) -> Log.debug(" {} [{}]", cmd.getElement().path(), cmd.getType()));
        Log.debug("========================");
        commands.addAll(dockerCommands);
        return commands;
    }
@ Override public List < AdaptationCommand > plan ( ContainerRoot currentModel , ContainerRoot targetModel ) throws KevoreeAdaptationException { final List < AdaptationCommand > commands = super . plan ( currentModel , targetModel ) ; final List < AdaptationCommand > dockerCommands = new ModelHelper ( context . getNodeName ( ) , docker , factory ) . model2docker ( currentModel , targetModel ) ; Log . debug ( "=== Docker commands ===" ) ; dockerCommands . forEach ( ( cmd ) -> Log . debug ( " {} [{}]" , cmd . getElement ( ) . path ( ) , cmd . getType ( ) ) ) ; Log . debug ( "========================" ) ; commands . addAll ( dockerCommands ) ; return commands ; }
This is called when the node has to adapt from currentModel to targetModel.
The goal of this method is to return a list of executable adaptation commands according to
the delta between currentModel and targetModel.

@param currentModel the currently in-use model
@param targetModel the model that we want to converge to
@return a list of commands to execute in order to go from currentModel to targetModel
@throws KevoreeAdaptationException when something goes wrong while planning adaptations