final List<ServiceInfo> existingServiceList = new ArrayList<ServiceInfo>();
lockNameToServiceInfo();
for (final String name : nameToServiceInfoHash.keySet()) {
final Map<String, ServiceInfo> idHash = nameToServiceInfoHash.get(name);
for (final String id : idHash.keySet()) {
final ServiceInfo si = idHash.get(id);
if (si.getService().isOrphaned()) {
continue;
}
final GroupInfo gi = si.getGroupInfo();
ServiceInfo sigi = si;
if (gi != null) {
sigi = gi;
// TODO: it does not work here
}
if (p == null || !getCrmGraph().existsInThePath(sigi, p)) {