@ 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 .