if (Strings.isNullOrEmpty(operatingSystemRecipe.distribution)) {
return OperatingSystem.DebianSqueeze;
}
Distribution distribution = Distribution.parse(operatingSystemRecipe.distribution);
String version = operatingSystemRecipe.version;
if (Strings.isNullOrEmpty(version)) {
version = distribution.getDefaultOsVersion();
}
return new OperatingSystem(distribution, version);
}