Class: MintPress::InfrastructureExalogic::ExalogicNetworkInterface

Inherits:
MintPress::Infrastructure::NetworkInterface show all
Includes:
MintLogger, Mixins::Properties
Defined in:
src/mintpress-infrastructure-oracle-exalogic/lib/mintpress-infrastructure-oracle-exalogic/exa_host_net.rb

Properties (Read/Write)

  • #vnet ⇒ Array of ⇒ String
    What vnet are we on?

    Property Attributes
    • requiredtrue
    [View source]
    
    26
    # File 'src/mintpress-infrastructure-oracle-exalogic/lib/mintpress-infrastructure-oracle-exalogic/exa_host_net.rb', line 26
    
    property :vnet, type: String, required: true, array: true
  • #name ⇒ String
    Naming

    Property Attributes
    [View source]
    
    13
    # 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 Attributes
    [View source]
    
    14
    # 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
    • defaultProc.new { self.postfix }
    [View source]
    
    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
    • defaultProc.new { host.dns_domain}
    [View source]
    
    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}'
    [View source]
    
    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}'
    [View source]
    
    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}'
    [View source]
    
    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 Attributes
    [View source]
    
    22
    # 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
    • default1
    [View source]
    
    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
    • default1
    [View source]
    
    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
    • defaultnil
    [View source]
    
    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
    • fromString
    • defaultProc.new { self.discover_ip }
    • cached_proctrue
    [View source]
    
    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
    • fromString
    • defaultProc.new { self.discover_public_ip }
    • cached_proctrue
    [View source]
    
    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
    • fromString
    • defaultProc.new { self.discover_netmask }
    [View source]
    
    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
    • fromString
    • key_typeIPAddr
    [View source]
    
    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
    • fromString
    • defaultProc.new { self.discover_gateway }
    • cached_proctrue
    [View source]
    
    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
    • fromString
    [View source]
    
    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
    • defaultfalse
    [View source]
    
    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
    • defaultProc.new { self.discover_mac_address }
    • cached_proctrue
    [View source]
    
    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
    [View source]
    
    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"
    [View source]
    
    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
    • defaulttrue
    [View source]
    
    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 Attributes
    [View source]
    
    51
    # 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
    • defaultProc.new { self.find_os_device }
    • cached_proctrue
    [View source]
    
    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
    • canonicaltrue
    [View source]
    
    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
    • defaultfalse
    [View source]
    
    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

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_mac_address, #discover_public_ip, #find_os_device

Methods included from Mixins::GenericProvider

included, #register_provider, #register_sub_provider

Constructor Details

#initialize(opts = {}) ⇒ ExalogicNetworkInterface

Returns a new instance of ExalogicNetworkInterface.

Instance Method Details

#createObject

These aren't actually individually creatable on exa, so this function does nothing other than fill in some metadata

#discover_ipObject

Grab the IP from the host object

#discover_netmaskObject

#find_allocatable_vnetObject

#find_indexObject

#get_vnet_by_id(vnet) ⇒ Object

#vnet_exists?Boolean

Returns:

  • (Boolean)