/** * First treats windows as a special case: check if platform==windows. * Then tries matching based on the image name. * And then falls back to checking other types of platform. */ private OsFamily parseOsFamily(org.jclouds.ec2.domain.Image from) { if (from.getPlatform() != null && from.getPlatform().equalsIgnoreCase("windows")) { return OsFamily.WINDOWS; } OsFamily family = parseOsFamilyOrUnrecognized(from.getImageLocation()); if (family == OsFamily.UNRECOGNIZED && from.getPlatform() != null) { family = parseOsFamilyOrUnrecognized(from.getPlatform()); } return family; } }
/** * First treats windows as a special case: check if platform==windows. * Then tries matching based on the image name. * And then falls back to checking other types of platform. */ private OsFamily parseOsFamily(org.jclouds.ec2.domain.Image from) { if (from.getPlatform() != null && from.getPlatform().equalsIgnoreCase("windows")) { return OsFamily.WINDOWS; } OsFamily family = parseOsFamilyOrUnrecognized(from.getImageLocation()); if (family == OsFamily.UNRECOGNIZED && from.getPlatform() != null) { family = parseOsFamilyOrUnrecognized(from.getPlatform()); } return family; } }
/** * First treats windows as a special case: check if platform==windows. * Then tries matching based on the image name. * And then falls back to checking other types of platform. */ private OsFamily parseOsFamily(org.jclouds.ec2.domain.Image from) { if (from.getPlatform() != null && from.getPlatform().equalsIgnoreCase("windows")) { return OsFamily.WINDOWS; } OsFamily family = parseOsFamilyOrUnrecognized(from.getImageLocation()); if (family == OsFamily.UNRECOGNIZED && from.getPlatform() != null) { family = parseOsFamilyOrUnrecognized(from.getPlatform()); } return family; } }
/** * First treats windows as a special case: check if platform==windows. * Then tries matching based on the image name. * And then falls back to checking other types of platform. */ private OsFamily parseOsFamily(org.jclouds.ec2.domain.Image from) { if (from.getPlatform() != null && from.getPlatform().equalsIgnoreCase("windows")) { return OsFamily.WINDOWS; } OsFamily family = parseOsFamilyOrUnrecognized(from.getImageLocation()); if (family == OsFamily.UNRECOGNIZED && from.getPlatform() != null) { family = parseOsFamilyOrUnrecognized(from.getPlatform()); } return family; } }
/** * First treats windows as a special case: check if platform==windows. * Then tries matching based on the image name. * And then falls back to checking other types of platform. */ private OsFamily parseOsFamily(org.jclouds.ec2.domain.Image from) { if (from.getPlatform() != null && from.getPlatform().equalsIgnoreCase("windows")) { return OsFamily.WINDOWS; } OsFamily family = parseOsFamilyOrUnrecognized(from.getImageLocation()); if (family == OsFamily.UNRECOGNIZED && from.getPlatform() != null) { family = parseOsFamilyOrUnrecognized(from.getPlatform()); } return family; } }