Class: CfFactory::CfNetworkInterface
- Inherits:
-
Object
- Object
- CfFactory::CfNetworkInterface
show all
- Includes:
- CfBase
- Defined in:
- lib/cf_factory/ec2/cf_network_interface.rb
Instance Method Summary
collapse
Methods included from CfBase
#generate, #generate_ref, #get_deletion_policy, #get_name, #get_update_policy, #hash_to_string, #retrieve_attribute, #set_meta_data, #set_quotes
Constructor Details
#initialize(name, subnet, options = {}) ⇒ CfNetworkInterface
Returns a new instance of CfNetworkInterface.
7
8
9
10
11
12
13
14
15
|
# File 'lib/cf_factory/ec2/cf_network_interface.rb', line 7
def initialize(name, subnet, options = {})
@name = name
@subnet = subnet
@private_ip = options[:private_ip]
@description = options[:description]
@security_groups = options[:security_groups]
@source_dst_check = options[:source_dest_check]
end
|
Instance Method Details
#get_cf_attributes ⇒ Object
25
26
27
|
# File 'lib/cf_factory/ec2/cf_network_interface.rb', line 25
def get_cf_attributes
{}
end
|
#get_cf_properties ⇒ Object
29
30
31
32
33
34
35
36
37
|
# File 'lib/cf_factory/ec2/cf_network_interface.rb', line 29
def get_cf_properties
result = {}
result["Description"] = @description unless @description.nil?
result["SourceDestCheck"] = @source_dest_check unless @source_dst_check.nil?
result["GroupSet"] = CfHelper.generate_ref_array(@security_groups) unless @security_groups.nil?
result["SubnetId"] = @subnet.generate_ref unless @subnet.nil?
result["PrivateIpAddress"] = @private_ip unless @private_ip.nil?
result
end
|
#get_cf_type ⇒ Object
17
18
19
|
# File 'lib/cf_factory/ec2/cf_network_interface.rb', line 17
def get_cf_type
"AWS::EC2::NetworkInterface"
end
|
21
22
23
|
# File 'lib/cf_factory/ec2/cf_network_interface.rb', line 21
def set_tags(tag_list)
@tag_list = tag_list
end
|