Class: CfFactory::CfInnerNetworkInterface

Inherits:
Object
  • Object
show all
Includes:
CfInner
Defined in:
lib/cf_factory/ec2/cf_inner_network_interface.rb

Instance Method Summary collapse

Methods included from CfInner

#generate, #generate_name, #hash_to_string, #set_quotes

Constructor Details

#initialize(network_interface, device_index, options = {}) ⇒ CfInnerNetworkInterface

Returns a new instance of CfInnerNetworkInterface.



11
12
13
14
15
# File 'lib/cf_factory/ec2/cf_inner_network_interface.rb', line 11

def initialize(network_interface, device_index, options = {})
  @network_interface = network_interface
  @device_index = device_index
  @delete_on_termination = options[:delete_on_termination]
end

Instance Method Details

#additional_indentObject



7
8
9
# File 'lib/cf_factory/ec2/cf_inner_network_interface.rb', line 7

def additional_indent
  2
end

#get_cf_attributesObject



17
18
19
20
21
22
23
# File 'lib/cf_factory/ec2/cf_inner_network_interface.rb', line 17

def get_cf_attributes
  result = {}
  result["NetworkInterfaceId"] = @network_interface.generate_ref
  result["DeviceIndex"] = @device_index
  result["DeleteOnTermination"] = @delete_on_termination unless @delete_on_termination.nil? 
  result
end