public NodeMetadata apply(VApp from) {
NodeMetadataBuilder builder = new NodeMetadataBuilder();
builder.ids(from.getHref().toASCIIString());
builder.uri(from.getHref());
builder.name(from.getName());
builder.hostname(from.getName());
Location vdcLocation = findLocationForResourceInVDC.apply(from.getVDC());
builder.location(vdcLocation);
if (from.getOsType() != null && OSType.fromValue(from.getOsType()) != OSType.UNRECOGNIZED) {
builder.operatingSystem(new CIMOperatingSystem(OSType.fromValue(from.getOsType()), "", null, from
.getOperatingSystemDescription()));