/** <exception>VdcDAL.IrsBrokerIRSErrorException. */
  public DiskImage buildImageEntity(Map<String, Object> xmlRpcStruct) {
    DiskImage newImage = new DiskImage();
    try {
      newImage.setImageId(new Guid((String) xmlRpcStruct.get(IrsProperties.uuid)));

      newImage.setParentId(new Guid((String) xmlRpcStruct.get(IrsProperties.parent)));
      newImage.setDescription((String) xmlRpcStruct.get(IrsProperties.description));
      newImage.setImageStatus(
          EnumUtils.valueOf(
              ImageStatus.class, (String) xmlRpcStruct.get(IrsProperties.ImageStatus), true));
      if (xmlRpcStruct.containsKey(IrsProperties.size)) {
        newImage.setSize(Long.parseLong(xmlRpcStruct.get(IrsProperties.size).toString()) * 512);
      }
      if (xmlRpcStruct.containsKey("capacity")) {
        newImage.setSize(Long.parseLong(xmlRpcStruct.get("capacity").toString()));
      }
      if (xmlRpcStruct.containsKey("truesize")) {
        newImage.setActualSizeInBytes(Long.parseLong(xmlRpcStruct.get("truesize").toString()));
      }
      if (xmlRpcStruct.containsKey("ctime")) {
        long secsSinceEpoch = Long.parseLong(xmlRpcStruct.get("ctime").toString());
        newImage.setCreationDate(MakeDTFromCTime(secsSinceEpoch));
      }
      if (xmlRpcStruct.containsKey("mtime")) {
        long secsSinceEpoch = Long.parseLong(xmlRpcStruct.get("mtime").toString());
        newImage.setLastModifiedDate(MakeDTFromCTime(secsSinceEpoch));
      }
      if (xmlRpcStruct.containsKey("domain")) {
        newImage.setStorageIds(
            new ArrayList<Guid>(Arrays.asList(new Guid(xmlRpcStruct.get("domain").toString()))));
      }
      if (xmlRpcStruct.containsKey("image")) {
        newImage.setimage_group_id(new Guid(xmlRpcStruct.get("image").toString()));
      }
      if (xmlRpcStruct.containsKey("type")) {
        newImage.setVolumeType(
            EnumUtils.valueOf(VolumeType.class, xmlRpcStruct.get("type").toString(), true));
      }
      if (xmlRpcStruct.containsKey("format")) {
        newImage.setvolumeFormat(
            EnumUtils.valueOf(VolumeFormat.class, xmlRpcStruct.get("format").toString(), true));
      }
    } catch (RuntimeException ex) {
      log.errorFormat("irsBroker::buildImageEntity::Failed building DIskImage");
      printReturnValue();
      log.error(ex.getMessage(), ex);
      newImage = null;
    }

    return newImage;
  }