Class: MintPress::InfrastructureAws::EC2NetworkInterface
- Inherits:
-
MintPress::Infrastructure::NetworkInterface
- Object
- MintPress::Infrastructure::NetworkInterface
- MintPress::InfrastructureAws::EC2NetworkInterface
- Includes:
- MintLogger, Mixins::Properties
- Defined in:
- src/mintpress-infrastructure-aws/lib/mintpress-infrastructure-aws/aws_host_net.rb
Direct Known Subclasses
Properties (Read/Write)
-
#platform ⇒ MintPress::InfrastructureAws::AwsPlatform (Default Value: Proc.new { parent.platform })
The AWS platform object - this is usually implied from the parent
Property Attributes- default ⇒ Proc.new { parent.platform }
27
# File 'src/mintpress-infrastructure-aws/lib/mintpress-infrastructure-aws/aws_host_net.rb', line 27 property :platform, type: MintPress::InfrastructureAws::AwsPlatform, default: Proc.new { parent.platform }
-
#region ⇒ String (Default Value: Proc.new { parent.region })
The AWS region - this is usually implied from the parent or the system
Property Attributes- default ⇒ Proc.new { parent.region }
29
# File 'src/mintpress-infrastructure-aws/lib/mintpress-infrastructure-aws/aws_host_net.rb', line 29 property :region, type: String, default: Proc.new { parent.region }
-
#subnet ⇒ Array of ⇒ MintPress::Aws::EC2::Subnet
The subnet on which the network exists. This can be implied from the parent
Property Attributes- from ⇒ String
31
# File 'src/mintpress-infrastructure-aws/lib/mintpress-infrastructure-aws/aws_host_net.rb', line 31 property :subnet, type: MintPress::Aws::EC2::Subnet, from: String, array: true
-
#associate_public_ip_address ⇒ [TrueClass, FalseClass] (Default Value: true)
Should we associate a public IP? Note that you can only have one of these per instance!
Property Attributes- default ⇒ true
33
# File 'src/mintpress-infrastructure-aws/lib/mintpress-infrastructure-aws/aws_host_net.rb', line 33 property :associate_public_ip_address, type: [TrueClass, FalseClass], default: true
-
#secondary_private_ip_address_count ⇒ Integer
How many secondary private IPs should we have? This is bound by the instance type
Property Attributes35
# File 'src/mintpress-infrastructure-aws/lib/mintpress-infrastructure-aws/aws_host_net.rb', line 35 property :secondary_private_ip_address_count, type: Integer
-
#delete_on_termination ⇒ [TrueClass, FalseClass] (Default Value: true)
Should this network adapter be deleted if the instance is terminated? This is usually desired
Property Attributes- default ⇒ true
37
# File 'src/mintpress-infrastructure-aws/lib/mintpress-infrastructure-aws/aws_host_net.rb', line 37 property :delete_on_termination, type: [TrueClass, FalseClass], default: true
-
#aws_id ⇒ String
The AWS id of this instance. This is only require if you are updating an existing nic
Property Attributes39
# File 'src/mintpress-infrastructure-aws/lib/mintpress-infrastructure-aws/aws_host_net.rb', line 39 property :aws_id, type: String
-
#name ⇒ String
Naming
Property Attributes13
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/network_interface.rb', line 13 property :name, type: String
-
#postfix ⇒ String
'Postfix for network adapter - "-mgt" for example'
Property Attributes14
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/network_interface.rb', line 14 property :postfix, type: String, description: 'Postfix for network adapter - "-mgt" for example'
-
#public_postfix ⇒ String (Default Value: Proc.new { self.postfix })
'Postfix for the public IP - -pub for example'
Property Attributes- default ⇒ Proc.new { self.postfix }
15
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/network_interface.rb', line 15 property :public_postfix, type: String, description: 'Postfix for the public IP - -pub for example', default: Proc.new { self.postfix }
-
#dns_domain ⇒ String (Default Value: Proc.new { host.dns_domain})
'DNS Domain - mintpress.io, for example. Will use the domain of the parent machine if nil'
Property Attributes- default ⇒ Proc.new { host.dns_domain}
16
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/network_interface.rb', line 16 property :dns_domain, type: String, default: Proc.new { host.dns_domain}, description: 'DNS Domain - mintpress.io, for example. Will use the domain of the parent machine if nil'
-
#hostname ⇒ String (Default Value: '#{host.hostname}#{postfix}')
Property Attributes- default ⇒ '#{host.hostname}#{postfix}'
17
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/network_interface.rb', line 17 property :hostname, type: String, default: '#{host.hostname}#{postfix}'
-
#fqdn ⇒ String (Default Value: '#{hostname}.#{dns_domain}')
Property Attributes- default ⇒ '#{hostname}.#{dns_domain}'
18
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/network_interface.rb', line 18 property :fqdn, type: String, default: '#{hostname}.#{dns_domain}'
-
#public_fqdn ⇒ String (Default Value: '#{host.hostname}#{public_postfix}.#{dns_domain}')
Property Attributes- default ⇒ '#{host.hostname}#{public_postfix}.#{dns_domain}'
19
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/network_interface.rb', line 19 property :public_fqdn, type: String, default: '#{host.hostname}#{public_postfix}.#{dns_domain}'
-
#enabled ⇒ [TrueClass, FalseClass]
'If the interface is virtual, this will control if it is connected or unplugged'
Property Attributes22
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/network_interface.rb', line 22 property :enabled, type: [TrueClass, FalseClass], description: 'If the interface is virtual, this will control if it is connected or unplugged'
-
#ip_count ⇒ Integer (Default Value: 1)
'Number of IPs to allocate. Not all providers support this'
Property Attributes- default ⇒ 1
24
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/network_interface.rb', line 24 property :ip_count, type: Integer, default: 1, description: 'Number of IPs to allocate. Not all providers support this'
-
#public_ip_count ⇒ Integer (Default Value: 1)
'Number of Public IPs to allocate. Not all providers support this.'
Property Attributes- default ⇒ 1
25
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/network_interface.rb', line 25 property :public_ip_count, type: Integer, default: 1, description: 'Number of Public IPs to allocate. Not all providers support this.'
-
#connected_network ⇒ String (Default Value: nil)
'A string representing which network to connect to upstream.'
Property Attributes- default ⇒ nil
26
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/network_interface.rb', line 26 property :connected_network, type: String, default: nil, description: 'A string representing which network to connect to upstream.'
-
#ip ⇒ Array of ⇒ IPAddr (Default Value: Proc.new { self.discover_ip })
'A list of all of the IP addresses to attach to this interfaces, if static allocation is sellected or has been harvested'
Property Attributes- from ⇒ String
- default ⇒ Proc.new { self.discover_ip }
- cached_proc ⇒ true
28
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/network_interface.rb', line 28 property :ip, type: IPAddr, array: true, from: String, description: 'A list of all of the IP addresses to attach to this interfaces, if static allocation is sellected or has been harvested', default: Proc.new { self.discover_ip }, cached_proc: true
-
#public_ip ⇒ Array of ⇒ IPAddr (Default Value: Proc.new { self.discover_public_ip })
'The public IPs attached to this interface'
Property Attributes- from ⇒ String
- default ⇒ Proc.new { self.discover_public_ip }
- cached_proc ⇒ true
29
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/network_interface.rb', line 29 property :public_ip, type: IPAddr, array: true, from: String, description: 'The public IPs attached to this interface', default: Proc.new { self.discover_public_ip }, cached_proc: true
-
#netmask ⇒ Array of ⇒ IPAddr (Default Value: Proc.new { self.discover_netmask })
'Netmask of this interface. If there are multiple local IPs, you must specify the same number of netmasks'
Property Attributes- from ⇒ String
- default ⇒ Proc.new { self.discover_netmask }
30
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/network_interface.rb', line 30 property :netmask, type: IPAddr, from: String, default: Proc.new { self.discover_netmask }, description: 'Netmask of this interface. If there are multiple local IPs, you must specify the same number of netmasks', array: true
-
#static_routes ⇒ Hash of ⇒ IPAddr
'A hash of network routes - format is router => iprange'
Property Attributes- from ⇒ String
- key_type ⇒ IPAddr
31
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/network_interface.rb', line 31 property :static_routes, type: IPAddr, hash: true, from: String, key_type: IPAddr, description: 'A hash of network routes - format is router => iprange'
-
#gateway ⇒ IPAddr (Default Value: Proc.new { self.discover_gateway })
"Usual Gateway of host"
Property Attributes- from ⇒ String
- default ⇒ Proc.new { self.discover_gateway }
- cached_proc ⇒ true
32
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/network_interface.rb', line 32 property :gateway, type: IPAddr, from: String, description: "Usual Gateway of host", default: Proc.new { self.discover_gateway }, cached_proc: true
-
#routes ⇒ Array of ⇒ IPAddr
"IP ranges that go through the usual gateway"
Property Attributes- from ⇒ String
33
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/network_interface.rb', line 33 property :routes, type: IPAddr, array: true, description: "IP ranges that go through the usual gateway", from: String
-
#static_ip ⇒ [TrueClass, FalseClass] (Default Value: false)
Property Attributes- default ⇒ false
35
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/network_interface.rb', line 35 property :static_ip, type: [TrueClass, FalseClass], default: false
-
#mac_address ⇒ String (Default Value: Proc.new { self.discover_mac_address })
MAC address of the interface
Property Attributes- default ⇒ Proc.new { self.discover_mac_address }
- cached_proc ⇒ true
38
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/network_interface.rb', line 38 property :mac_address, type: String, default: Proc.new { self.discover_mac_address }, cached_proc: true
-
#allocator ⇒ [Symbol, MintPress::Infrastructure::IPAllocator] (Default Value: :auto)
'IP Allocation strategy - options are :auto, :dhcp, :static, or a pointer to an IPAllocator class'
Property Attributes- default ⇒ :auto
41
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/network_interface.rb', line 41 property :allocator, type: [Symbol, MintPress::Infrastructure::IPAllocator], default: :auto, description: 'IP Allocation strategy - options are :auto, :dhcp, :static, or a pointer to an IPAllocator class'
-
#interface_type ⇒ Array of ⇒ String (Default Value: "public")
'The semantic interface type - standard options are public and private, but some applicaitons can use additional metadata here - for example, storage, cluster or rac-private'
Property Attributes- default ⇒ "public"
44
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/network_interface.rb', line 44 property :interface_type, type: String, array: true, default: "public", description: 'The semantic interface type - standard options are public and private, but some applicaitons can use additional metadata here - for example, storage, cluster or rac-private'
-
#use_provided_dns ⇒ [TrueClass, FalseClass] (Default Value: true)
Property Attributes- default ⇒ true
46
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/network_interface.rb', line 46 property :use_provided_dns, type: [TrueClass, FalseClass], default: true
-
#device_index ⇒ Integer
Order to attach - if this is not specified, we'll attach them in any order we feel like Note that the provisioners should fill in enough data that the bootstrap modules can correctly associate them inside the OS
Property Attributes51
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/network_interface.rb', line 51 property :device_index, type: Integer
-
#os_device ⇒ String (Default Value: Proc.new { self.find_os_device })
Property Attributes- default ⇒ Proc.new { self.find_os_device }
- cached_proc ⇒ true
53
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/network_interface.rb', line 53 property :os_device, type: String, default: Proc.new { self.find_os_device }, cached_proc: true
-
#host ⇒ MintPress::Infrastructure::Host
Property Attributes- canonical ⇒ true
55
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/network_interface.rb', line 55 property :host, type: MintPress::Infrastructure::Host, canonical: true
-
#auto_created ⇒ [TrueClass, FalseClass] (Default Value: false)
Was this network interface internally created? Some provisioners change their behaviour based on this...
Property Attributes- default ⇒ false
58
# File 'src/mintpress-infrastructure/lib/mintpress-infrastructure/network_interface.rb', line 58 property :auto_created, type: [TrueClass, FalseClass], default: false
Properties (Read Only)
Constant Summary
Constants included from MintLogger
MintLogger::DEBUG, MintLogger::ERROR, MintLogger::FATAL, MintLogger::INFO, MintLogger::UNKNOWN, MintLogger::VERBOSE, MintLogger::WARN
Instance Attribute Summary
Attributes included from Mixins::Properties
#autopush_set_cache, #dynamic_create, #harvest_on_access, #harvest_undefined_only, #harvested, #tree_root
Instance Method Summary collapse
- #affinity_id ⇒ Object
- #create ⇒ Object
- #create_object ⇒ Object
- #discover_ip ⇒ Object
- #discover_mac_address ⇒ Object
-
#discover_public_ip ⇒ Object
We have to discover this via the service, bcause the ruby API actually does not allow getting this for many instance types, due to bugs.
- #get_nic_metadata ⇒ Object
-
#index ⇒ Object
This function is bogus as hell, and we're going to replace it....
-
#initialize(opts = {}) ⇒ EC2NetworkInterface
constructor
A new instance of EC2NetworkInterface.
Methods included from Mixins::Properties
#[], #[]=, #add_validate_report_result, #armour_set_property, #array_contains?, #array_is_a?, #check_autopush, #check_stack_overflow, #clone_property_object, #cloner_handle_single_property, #coerce_single, #contains_as_string?, #display_validate_report_result, #double_initialize?, #dump_to_hash, #find_parent, #find_parent_by_identity, #generate_accessor_functions, #get_canonical_renamed, #get_from_opts, #get_my_name, #get_property, #get_property_item, #has?, included, #initialize_validate_report, #inspect, #is_cloned_object?, #is_mintpress_object?, #is_probably_canonical?, #is_set?, #local_debug, #local_info, #local_verbose, #mintpress_property_definitions, #place_object_by_identity, #process_properties, #prop_set?, #property, #property_definitions, #property_details, #property_is_simple_object?, #push_root!, #require_property, #require_update, #retrieve_docstring, #sanitize, #set_map_dirty, #set_property, #set_property_item, #show_short_array, #strip_defaults!, #synchronize, #uncloned_property_definitions, #update_map, #validate, #validate_generic, #validate_properties, #validate_property, #validate_required, #version_allowed?, #weakref
Methods included from MintLogger::Utils::Common
#boolean_val, #has_value?, #no_value?, #nvl, #path_as_symbol, #ruby_level_to_send
Methods inherited from MintPress::Infrastructure::NetworkInterface
#add_routes_to_system, #configure_os, #discover_gateway, #discover_netmask, #find_os_device
Methods included from Mixins::GenericProvider
included, #register_provider, #register_sub_provider