}
private Iterable<MachineType> listMachineTypes(String projectId) throws OpsException {
List<MachineType> ret = Lists.newArrayList();
MachineTypeList machineTypeList;
try {
log.debug("Listing machine types in project " + projectId);
machineTypeList = compute.machineTypes().list(projectId).execute();
} catch (IOException e) {
throw new OpsException("Error listing machine types", e);
}
if (machineTypeList.getItems() != null) {
ret.addAll(machineTypeList.getItems());
}
return ret;
}