@Override public boolean apply(Image input) { return input.getProviderId().equals(instance.getImageId() + ""); }
@Override public boolean apply(Hardware input) { return input.getProviderId().equals(instance.getFlavorId() + ""); }
@Override public NodeMetadata apply(Server from) { NodeMetadataBuilder builder = new NodeMetadataBuilder(); builder.ids(from.getId() + ""); builder.name(from.getName()); builder.hostname(from.getName()); builder.location( new LocationBuilder() .scope(LocationScope.HOST) .id(from.getHostId()) .description(from.getHostId()) .parent(location.get()) .build()); addMetadataAndParseTagsFromCommaDelimitedValue(builder, from.getMetadata()); builder.group(groupFromMapOrName(from.getMetadata(), from.getName(), nodeNamingConvention)); builder.imageId(from.getImageId() + ""); builder.operatingSystem(parseOperatingSystem(from)); builder.hardware(parseHardware(from)); builder.status(serverToNodeStatus.get(from.getStatus())); builder.publicAddresses(from.getAddresses().getPublicAddresses()); builder.privateAddresses(from.getAddresses().getPrivateAddresses()); return builder.build(); }