private ResourceInstance createResource(String osType) {
    final Map<Resource.Type, String> mapIds = new HashMap<>();
    mapIds.putAll(parentKeyProperties);
    mapIds.put(Resource.Type.OperatingSystem, osType);
    return createResource(Resource.Type.OperatingSystem, mapIds);
  }
Create an operating system resource instance.

@param osType os type

@return an operating system instance
ambari-server/src/main/java/org/apache/ambari/server/api/services/OperatingSystemService.java