in cloud-vmware-server/src/main/java/jetbrains/buildServer/clouds/vmware/connector/VMWareApiConnectorImpl.java [610:632]
private String getFullPath(@NotNull final String entityName,
@NotNull final ManagedObjectReference mor,
@Nullable final ManagedObjectReference firstParent,
@Nullable final Datacenter dc){
final String uniqueName = String.format("%s (%s)", entityName, mor.getVal());
if (firstParent == null) {
return uniqueName;
}
try {
final String morPath = getFullMORPath(createExactManagedEntity(firstParent), dc);
if (StringUtil.isEmpty(morPath)) {
return uniqueName;
} else if (("Resources".equals(entityName) || "vm".equals(entityName)) && !mor.getType().equals(firstParent.getType())) {
LOG.debug("The pool is a special pool. Skipping it...");
return morPath;
} else {
return morPath + "/" + entityName;
}
} catch (Exception ex){
LOG.warnAndDebugDetails("Can't calculate full path for " + uniqueName, ex);
return uniqueName;
}
}