Class: MintPress::InfrastructureOci::Vnic

Inherits:
Object
  • Object
show all
Includes:
MintLogger, TagUtils, Mixins::Properties
Defined in:
src/mintpress-infrastructure-oci/lib/mintpress-infrastructure-oci/oci_vnic.rb

Properties (Read/Write)

  • #name ⇒ String
    'The name of the vnic'

    Property Attributes
    • alias:display_name
    
    
    23
    # File 'src/mintpress-infrastructure-oci/lib/mintpress-infrastructure-oci/oci_vnic.rb', line 23
    
    property :name, type: String, description: 'The name of the vnic', alias: :display_name
  • #host ⇒ MintPress::InfrastructureOci::OCIHost
    'Host object this vnic will be attached to.'

    Property Attributes
    
    
    25
    # File 'src/mintpress-infrastructure-oci/lib/mintpress-infrastructure-oci/oci_vnic.rb', line 25
    
    property :host, type: MintPress::InfrastructureOci::OCIHost, description: 'Host object this vnic will be attached to.'
  • #platform ⇒ MintPress::InfrastructureOci::OciPlatform (Default Value: Proc.new { if opts[:provider] MintPress::InfrastructureOci::OciPlatform.new(:provider => opts[:provider]) else MintPress::InfrastructureOci::OciPlatform.new end })
    'This incapsulates all properties required for the OCI provider.'

    Property Attributes
    • defaultProc.new { if opts[:provider] MintPress::InfrastructureOci::OciPlatform.new(:provider => opts[:provider]) else MintPress::InfrastructureOci::OciPlatform.new end }
    
    
    28
    29
    30
    31
    32
    33
    34
    # File 'src/mintpress-infrastructure-oci/lib/mintpress-infrastructure-oci/oci_vnic.rb', line 28
    
    property :platform, type: MintPress::InfrastructureOci::OciPlatform, default: Proc.new {
      if opts[:provider]
        MintPress::InfrastructureOci::OciPlatform.new(:provider => opts[:provider])
      else
        MintPress::InfrastructureOci::OciPlatform.new
      end
    }, description: 'This incapsulates all properties required for the OCI provider.'
  • #assign_ipv6_ip ⇒ [TrueClass, FalseClass] (Default Value: false)
    "Whether to allocate an IPv6 address at instance and VNIC creation from an IPv6 enabled subnet. Default: False. When provided you may optionally provide an IPv6 prefix (ipv6SubnetCidr) of your choice to assign the IPv6 address from. If ipv6SubnetCidr is not provided then an IPv6 prefix is chosen for you."

    Property Attributes
    • defaultfalse
    
    
    36
    # File 'src/mintpress-infrastructure-oci/lib/mintpress-infrastructure-oci/oci_vnic.rb', line 36
    
    property :assign_ipv6_ip, type: [TrueClass, FalseClass], default: false, description: "Whether to allocate an IPv6 address at instance and VNIC creation from an IPv6 enabled subnet. Default: False. When provided you may optionally provide an IPv6 prefix (ipv6SubnetCidr) of your choice to assign the IPv6 address from. If ipv6SubnetCidr is not provided then an IPv6 prefix is chosen for you."
  • #assign_private_dns_record ⇒ [TrueClass, FalseClass] (Default Value: false)
    'Whether the VNIC should be assigned a DNS record. If set to false, there will be no DNS record registration for the VNIC. If set to true, the DNS record will be registered. The default value is false.'

    Property Attributes
    • defaultfalse
    
    
    38
    # File 'src/mintpress-infrastructure-oci/lib/mintpress-infrastructure-oci/oci_vnic.rb', line 38
    
    property :assign_private_dns_record, type: [TrueClass, FalseClass], default: false, description: 'Whether the VNIC should be assigned a DNS record. If set to false, there will be no DNS record registration for the VNIC. If set to true, the DNS record will be registered. The default value is false.'
  • #assign_public_ip ⇒ [TrueClass, FalseClass] (Default Value: false)
    'Whether the VNIC should be assigned a public IP address. Defaults to whether the subnet is public or private. If not set and the VNIC is being created in a private subnet (that is, where prohibitPublicIpOnVnic = true in the Subnet), then no public IP address is assigned. If not set and the subnet is public (prohibitPublicIpOnVnic = false), then a public IP address is assigned. If set to true and prohibitPublicIpOnVnic = true, an error is returned.'

    Property Attributes
    • defaultfalse
    
    
    40
    # File 'src/mintpress-infrastructure-oci/lib/mintpress-infrastructure-oci/oci_vnic.rb', line 40
    
    property :assign_public_ip, type: [TrueClass, FalseClass], default: false, description: 'Whether the VNIC should be assigned a public IP address. Defaults to whether the subnet is public or private. If not set and the VNIC is being created in a private subnet (that is, where prohibitPublicIpOnVnic = true in the Subnet), then no public IP address is assigned. If not set and the subnet is public (prohibitPublicIpOnVnic = false), then a public IP address is assigned. If set to true and prohibitPublicIpOnVnic = true, an error is returned.'
  • #hostname_label ⇒ String (Default Value: nil)
    "The hostname for the VNIC's primary private IP. Used for DNS. The value is the hostname portion of the primary private IP's fully qualified domain name (FQDN)"

    Property Attributes
    • defaultnil
    
    
    42
    # File 'src/mintpress-infrastructure-oci/lib/mintpress-infrastructure-oci/oci_vnic.rb', line 42
    
    property :hostname_label, type: String, default: nil, description: "The hostname for the VNIC's primary private IP. Used for DNS. The value is the hostname portion of the primary private IP's fully qualified domain name (FQDN)"
  • #ipv6_address_ipv6_subnet_cidr_pair_details ⇒ Array of ⇒ OCI::Core::Models::Ipv6AddressIpv6SubnetCidrPairDetails (Default Value: [])
    "A list of IPv6 prefix ranges from which the VNIC is assigned an IPv6 address. You can provide only the prefix ranges from which OCI selects an available address from the range. You can optionally choose to leave the prefix range empty and instead provide the specific IPv6 address within that range to use."

    Property Attributes
    • default[]
    
    
    44
    # File 'src/mintpress-infrastructure-oci/lib/mintpress-infrastructure-oci/oci_vnic.rb', line 44
    
    property :ipv6_address_ipv6_subnet_cidr_pair_details, type: OCI::Core::Models::Ipv6AddressIpv6SubnetCidrPairDetails, array: true, default: [], description: "A list of IPv6 prefix ranges from which the VNIC is assigned an IPv6 address. You can provide only the prefix ranges from which OCI selects an available address from the range. You can optionally choose to leave the prefix range empty and instead provide the specific IPv6 address within that range to use."
  • #nsg_ids ⇒ Array of ⇒ String (Default Value: Proc.new {self.host.network_security_groups})
    'A list of the OCIDs of the network security groups (NSGs) to add the VNIC to.'

    Property Attributes
    • defaultProc.new {self.host.network_security_groups}
    
    
    46
    # File 'src/mintpress-infrastructure-oci/lib/mintpress-infrastructure-oci/oci_vnic.rb', line 46
    
    property :nsg_ids, type: String, array: true, default: Proc.new {self.host.network_security_groups}, description: 'A list of the OCIDs of the network security groups (NSGs) to add the VNIC to.'
  • #private_ip ⇒ String (Default Value: nil)
    "A private IP address of your choice to assign to the VNIC. Must be an available IP address within the subnet's CIDR. If you don't specify a value, Oracle automatically assigns a private IP address from the subnet. This is the VNIC's primary private IP address."

    Property Attributes
    • defaultnil
    
    
    48
    # File 'src/mintpress-infrastructure-oci/lib/mintpress-infrastructure-oci/oci_vnic.rb', line 48
    
    property :private_ip, type: String, default: nil, description: "A private IP address of your choice to assign to the VNIC. Must be an available IP address within the subnet's CIDR. If you don't specify a value, Oracle automatically assigns a private IP address from the subnet. This is the VNIC's primary private IP address."
  • #skip_source_dest_check ⇒ [TrueClass, FalseClass] (Default Value: false)
    'Whether the source/destination check is disabled on the VNIC. Defaults to false, which means the check is performed.'

    Property Attributes
    • defaultfalse
    
    
    50
    # File 'src/mintpress-infrastructure-oci/lib/mintpress-infrastructure-oci/oci_vnic.rb', line 50
    
    property :skip_source_dest_check, type: [TrueClass, FalseClass], default: false, description: 'Whether the source/destination check is disabled on the VNIC. Defaults to false, which means the check is performed.'
  • #subnet_id ⇒ String (Default Value: Proc.new {self.host.subnet_id})
    "The OCID of the subnet to create the VNIC in."

    Property Attributes
    • defaultProc.new {self.host.subnet_id}
    
    
    52
    # File 'src/mintpress-infrastructure-oci/lib/mintpress-infrastructure-oci/oci_vnic.rb', line 52
    
    property :subnet_id, type: String, default: Proc.new {self.host.subnet_id}, description: "The OCID of the subnet to create the VNIC in."
  • #instance_id ⇒ String (Default Value: Proc.new{self.host.instance_id})
    "The OCID of the host to atache the VNIC to."

    Property Attributes
    • defaultProc.new{self.host.instance_id}
    
    
    54
    # File 'src/mintpress-infrastructure-oci/lib/mintpress-infrastructure-oci/oci_vnic.rb', line 54
    
    property :instance_id, type: String, default: Proc.new{self.host.instance_id}, description: "The OCID of the host to atache the VNIC to."
  • #vlan_id ⇒ String (Default Value: nil)
    "Provide this attribute only if you are an Oracle Cloud VMware Solution customer and creating a secondary VNIC in a VLAN. The value is the OCID of the VLAN."

    Property Attributes
    • defaultnil
    
    
    56
    # File 'src/mintpress-infrastructure-oci/lib/mintpress-infrastructure-oci/oci_vnic.rb', line 56
    
    property :vlan_id, type: String, default: nil, description: "Provide this attribute only if you are an Oracle Cloud VMware Solution customer and creating a secondary VNIC in a VLAN. The value is the OCID of the VLAN."
  • #id ⇒ String
    'ID for the vnic attachment.'

    Property Attributes
    
    
    58
    # File 'src/mintpress-infrastructure-oci/lib/mintpress-infrastructure-oci/oci_vnic.rb', line 58
    
    property :id, type: String, description: 'ID for the vnic attachment.'
  • #vnic_attachment_id ⇒ String
    'Attachment ID for the vnic attachment.'

    Property Attributes
    
    
    59
    # File 'src/mintpress-infrastructure-oci/lib/mintpress-infrastructure-oci/oci_vnic.rb', line 59
    
    property :vnic_attachment_id, type: String, description: 'Attachment ID for the vnic attachment.'
  • #compartment ⇒ String (Default Value: Proc.new {self.host.compartment})
    'The compartment ID that will be used for all the VMs built using this provider.'

    Property Attributes
    • defaultProc.new {self.host.compartment}
    • alias:compartment_id
    
    
    63
    # File 'src/mintpress-infrastructure-oci/lib/mintpress-infrastructure-oci/oci_vnic.rb', line 63
    
    property :compartment, type: String, default: Proc.new {self.host.compartment}, description: 'The compartment ID that will be used for all the VMs built using this provider.', alias: :compartment_id
  • #nic_index ⇒ Integer (Default Value: nil)
    "Which physical network interface card (NIC) the VNIC will use. This is used by attach_vnic function."

    Property Attributes
    • defaultnil
    
    
    65
    # File 'src/mintpress-infrastructure-oci/lib/mintpress-infrastructure-oci/oci_vnic.rb', line 65
    
    property :nic_index, type: Integer, default: nil, description: "Which physical network interface card (NIC) the VNIC will use. This is used by attach_vnic function."

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 TagUtils

#clear_tags, #fetch_resource_details, #import_tag_properties, #manage_tags, #merge_defined_tags, #remove_defined_tags, #remove_tags, #update_resource, #update_tags

Methods included from CommonUtils

#create_status_check_proc, #destroy_status_check_proc, #filter_nil_properties, #populate_properties

Methods included from MintLogger::Utils::Common

#boolean_val, #has_value?, #no_value?, #nvl, #path_as_symbol, #ruby_level_to_send

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

Constructor Details

#initialize(opts = {}) ⇒ Vnic

Returns a new instance of Vnic.

Instance Method Details

#attachObject

#check_vnic_status(vnic_attachment_id) ⇒ Object

#createObject

#destroyObject

#dettachObject

#exists?Boolean

Returns:

  • (Boolean)

#updateObject