def capture_image(image_name, include_attached_storage = false, image_notes = '')
      image_notes = '' if !image_notes
      image_name = 'Captured Image' if !image_name

      disk_filter = lambda { |disk| disk['device'] == '0' }
      disk_filter = lambda { |disk| disk['device'] != '1' } if include_attached_storage

      disks = self.blockDevices.select(&disk_filter)

      self.service.createArchiveTransaction(image_name, disks, image_notes) if disks && !disks.empty?

      image_templates = SoftLayer::ImageTemplate.find_private_templates(:name => image_name)
      image_templates[0] if !image_templates.empty?
    end
def capture_image(image_name, include_attached_storage = false, image_notes = '')
      image_notes = '' if !image_notes
      image_name = 'Captured Image' if !image_name

      disk_filter = lambda { |disk| disk['device'] == '0' }
      disk_filter = lambda { |disk| disk['device'] != '1' } if include_attached_storage

      disks = self.blockDevices.select(&disk_filter)

      self.service.createArchiveTransaction(image_name, disks, image_notes) if disks && !disks.empty?

      image_templates = SoftLayer::ImageTemplate.find_private_templates(:name => image_name)
      image_templates[0] if !image_templates.empty?
    end
Capture a disk image of this virtual server for use with other servers.

 image_name will become the name of the image in the portal.

 If include_attached_storage is true, the images of attached storage will be
 included as well.

 The image_notes should be a string and will be added to the image as notes.

 The routine returns the instance of SoftLayer::ImageTemplate that is
 created.  That image template will probably not be available immediately, however.
 You may use the wait_until_ready routine of SoftLayer::ImageTemplate to
 wait on it.