Class: PackerFiles::Core::CDImage

Inherits:
Base
  • Object
show all
Defined in:
lib/PackerFiles/Core/CDImage.rb

Overview

Used for figuring out the URLs and Checksum values for the installer images of debian.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize {|_self| ... } ⇒ CDImage

Constructor that yields self for accessor settings.

Yields:

  • (_self)

Yield Parameters:



61
62
63
# File 'lib/PackerFiles/Core/CDImage.rb', line 61

def initialize
   yield self if block_given?
end

Instance Attribute Details

#archObject

Accessors that can be set.



41
42
43
# File 'lib/PackerFiles/Core/CDImage.rb', line 41

def arch
  @arch
end

#check_sumObject

Returns the value of attribute check_sum.



50
51
52
# File 'lib/PackerFiles/Core/CDImage.rb', line 50

def check_sum
  @check_sum
end

#check_sum_patternObject

Returns the value of attribute check_sum_pattern.



44
45
46
# File 'lib/PackerFiles/Core/CDImage.rb', line 44

def check_sum_pattern
  @check_sum_pattern
end

#check_sum_typeObject

Returns the value of attribute check_sum_type.



45
46
47
# File 'lib/PackerFiles/Core/CDImage.rb', line 45

def check_sum_type
  @check_sum_type
end

#impl=(value) ⇒ Object (writeonly)

Implementation class for CD Image.



53
54
55
# File 'lib/PackerFiles/Core/CDImage.rb', line 53

def impl=(value)
  @impl = value
end

#index_urlsObject

Accessors that can be derived if not set



48
49
50
# File 'lib/PackerFiles/Core/CDImage.rb', line 48

def index_urls
  @index_urls
end

#iso_name_patternObject

Returns the value of attribute iso_name_pattern.



43
44
45
# File 'lib/PackerFiles/Core/CDImage.rb', line 43

def iso_name_pattern
  @iso_name_pattern
end

#iso_urlObject

Returns the value of attribute iso_url.



49
50
51
# File 'lib/PackerFiles/Core/CDImage.rb', line 49

def iso_url
  @iso_url
end

#releaseObject

Returns the value of attribute release.



42
43
44
# File 'lib/PackerFiles/Core/CDImage.rb', line 42

def release
  @release
end

Class Method Details

.doc_fileObject

Documentation for this class



56
57
58
# File 'lib/PackerFiles/Core/CDImage.rb', line 56

def self.doc_file
   PackerFiles.DirPath('Core/example/CDImage.txt').first
end

Instance Method Details

#normalizeObject

Overriden normalize

Raises:



66
67
68
69
70
71
72
73
74
# File 'lib/PackerFiles/Core/CDImage.rb', line 66

def normalize
  
   # Do some basic checks.
   raise NilException.new(self, 'arch')    if @arch.nil?
   raise NilException.new(self, 'release') if @release.nil?

   # Get everything else.
   set_iso_url_and_checksum
end