# File lib/aeolus_image/import.rb, line 17
    def self.import(provider_name, deltacloud_driver, image_id, account_id, xml=nil)
      xml ||= "<image><name>#{image_id}</name></image>"
      image = Factory::Image.new(
        :target_name => deltacloud_driver,
        :provider_name => provider_name,
        :target_identifier => image_id,
        :image_descriptor => xml
      )
      image.save!
      # Set the provider_account_id on the image
      iwhd_image = Warehouse::Image.find(image.id)
      # Set the account on the provider image
      # This assumes (as is currently correct) that there will only be one provider image for imported images
      pimg = iwhd_image.provider_images.first
      pimg.set_attr('provider_account_identifier', account_id)
      image
    end