Class: Packer::Builder::Null

Inherits:
Packer::Builder show all
Defined in:
lib/packer/builders/null.rb

Constant Summary

Constants inherited from Packer::Builder

AMAZON_EBS, AMAZON_INSTANCE, DOCKER, NULL, VALID_BUILDER_TYPES, VIRTUALBOX_ISO

Instance Attribute Summary

Attributes inherited from DataObject

#data, #required

Instance Method Summary collapse

Methods inherited from Packer::Builder

get_builder, #name, types

Methods inherited from DataObject

#__add_array_of_array_of_strings, #__add_array_of_hashes, #__add_array_of_strings, #__add_boolean, #__add_hash, #__add_integer, #__add_string, #__exclusive_key_error, #add_required, #deep_copy, #validate

Constructor Details

#initializeNull

Returns a new instance of Null.



8
9
10
11
12
13
14
15
16
17
# File 'lib/packer/builders/null.rb', line 8

def initialize
  super
  self.data['type'] = NULL
  self.add_required(
    'host',
    'ssh_password',
    'ssh_private_key_file',
    'ssh_username'
  )
end

Instance Method Details

#host(name) ⇒ Object



19
20
21
# File 'lib/packer/builders/null.rb', line 19

def host(name)
  self.__add_string('host', name)
end

#port(number) ⇒ Object



35
36
37
# File 'lib/packer/builders/null.rb', line 35

def port(number)
  self.__add_integer('port', number)
end

#ssh_password(passwd) ⇒ Object



23
24
25
# File 'lib/packer/builders/null.rb', line 23

def ssh_password(passwd)
  self.__add_string('ssh_password', passwd)
end

#ssh_private_key_file(filename) ⇒ Object



27
28
29
# File 'lib/packer/builders/null.rb', line 27

def ssh_private_key_file(filename)
  self.__add_string('ssh_private_key_file', filename)
end

#ssh_username(name) ⇒ Object



31
32
33
# File 'lib/packer/builders/null.rb', line 31

def ssh_username(name)
  self.__add_string('ssh_username', name)
end