private void removeEC(ExternalComponentInstance<? extends ExternalComponent> ni) { removedECs.put(ni,currentDM.getComponentInstances().onlyInternals().hostedOn(ni).toList()); //create action }
private void visitPuppetResources(ComponentInstance ci){ InternalComponentInstanceGroup icig= currentModel.getComponentInstances().onlyInternals().hostedOn(ci); if(icig !=null){ for(ComponentInstance c : icig){ InternalComponentInstance ici; PuppetResource pr=findPuppetResource(c); if(pr != null) manifest+=pr.getManifestEntry()+System.lineSeparator(); visitPuppetResources(c); } } }
private void migrateAllHostedComponents(Deployment deployment) { final InternalComponentInstanceGroup hosted = deployment.getComponentInstances().onlyInternals().hostedOn(artefactInstance); for (InternalComponentInstance hostedComponent: hosted) { getLibrary().migrate(deployment, hostedComponent); } }
private void allHosted(ComponentInstance ci, Deployment target){ InternalComponentInstanceGroup icig= currentModel.getComponentInstances().onlyInternals().hostedOn(ci); if(icig !=null){ hostedGroup.addAll(icig); for(ComponentInstance c : icig){ InternalComponentInstance ici; if(ci.isExternal()) ici=getLibrary().replicateComponentInstance(target, c, host).asInternal(); else ici=getLibrary().replicateComponentInstance(target, c, mapping.get(ci)).asInternal(); mapping.put(c.asInternal(), ici); allHosted(c, target); } } }
@Override public Void applyTo(Deployment deployment) { final InternalComponentInstanceGroup hosted = deployment.getComponentInstances().onlyInternals().hostedOn(instance); for(InternalComponentInstance hostedComponent: hosted) { getLibrary().migrate(deployment, hostedComponent); } getLibrary().stop(deployment, instance); deployment.getComponentInstances().remove(instance); return NOTHING; }