def validate
      super

      medium_formats = Global.global.system_properties.medium_formats.collect { |mf| mf.id }
      validates_inclusion_of :format, :in => medium_formats, :message => "must be one of the following: #{medium_formats.join(', ')}."

      validates_presence_of :location

      max_vdi_size = Global.global.system_properties.info_vdi_size
      validates_inclusion_of :logical_size, :in => (0..max_vdi_size), :message => "must be between 0 and #{max_vdi_size}."
    end
def validate
      super

      medium_formats = Global.global.system_properties.medium_formats.collect { |mf| mf.id }
      validates_inclusion_of :format, :in => medium_formats, :message => "must be one of the following: #{medium_formats.join(', ')}."

      validates_presence_of :location

      max_vdi_size = Global.global.system_properties.info_vdi_size
      validates_inclusion_of :logical_size, :in => (0..max_vdi_size), :message => "must be between 0 and #{max_vdi_size}."
    end
Validates a hard drive for the minimum attributes required to
 create or save.