Module: Cloudkeeper::Entities::Convertables::Ova

Defined in:
lib/cloudkeeper/entities/convertables/ova.rb

Constant Summary collapse

CONVERT_OUTPUT_FORMATS =
%i(raw qcow2).freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.convert_output_formats ⇒ Object



7
8
9
# File 'lib/cloudkeeper/entities/convertables/ova.rb', line 7

def self.convert_output_formats
  CONVERT_OUTPUT_FORMATS
end

.extended(base) ⇒ Object



11
12
13
14
15
16
# File 'lib/cloudkeeper/entities/convertables/ova.rb', line 11

def self.extended(base)
  raise Cloudkeeper::Errors::Convertables::ConvertabilityError, "#{base.inspect} cannot become OVA convertable" \
    unless base.class.included_modules.include?(Cloudkeeper::Entities::Convertables::Convertable)

  super
end

Instance Method Details

#to_ova ⇒ Object



22
23
24
# File 'lib/cloudkeeper/entities/convertables/ova.rb', line 22

def to_ova
  self
end

#to_vmdk ⇒ Object



18
19
20
# File 'lib/cloudkeeper/entities/convertables/ova.rb', line 18

def to_vmdk
  image_file(extract_disk, :vmdk)
end