Class: Com::Vmware::Vcenter::Vm::Hardware::BootService::NetworkProtocol

Inherits:
VAPI::Bindings::VapiEnum
  • Object
show all
Defined in:
/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware.rb

Overview

The ``Com::Vmware::Vcenter::Vm::Hardware::Boot::NetworkProtocol`` enumerated type defines the valid network boot protocols supported when booting a virtual machine with :attr:`Com::Vmware::Vcenter::Vm::Hardware::Boot::Type.EFI` firmware over the network.

Constant Summary

IP_V4 =
NetworkProtocol.new('IP_V4')
IP_V6 =
NetworkProtocol.new('IP_V6')

Instance Attribute Summary (collapse)

Class Method Summary (collapse)

Instance Attribute Details

- (Com::Vmware::Vcenter::Vm::Hardware::Boot::NetworkProtocol) ip_v4

PXE or Apple NetBoot over IPv4.

Returns:

  • (Com::Vmware::Vcenter::Vm::Hardware::Boot::NetworkProtocol)


412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware.rb', line 412

class NetworkProtocol < VAPI::Bindings::VapiEnum

    class << self
        # Holds (gets or creates) the binding type metadata for this enumeration type.
        # @scope class
        # @return [VAPI::Bindings::EnumType] the binding type
        def binding_type
            @binding_type ||= VAPI::Bindings::EnumType.new(
                'com.vmware.vcenter.vm.hardware.boot.network_protocol',
                NetworkProtocol)
        end

        # Converts from a string value (perhaps off the wire) to an instance
        # of this enum type.
        # @param value [String] the actual value of the enum instance
        # @return [NetworkProtocol] the instance found for the value, otherwise
        #         an unknown instance will be built for the value
        def from_string(value)
            begin
                const_get(value)
            rescue NameError
                NetworkProtocol.new('UNKNOWN', value)
            end
        end
    end

    private

    # Constructs a new instance.
    # @param value [String] the actual value of the enum instance
    # @param unknown [String] the unknown value when value is 'UKNOWN'
    def initialize(value, unknown=nil)
        super(self.class.binding_type, value, unknown)
    end

    public

    # @!attribute [rw] ip_v4
    #     @return [Com::Vmware::Vcenter::Vm::Hardware::Boot::NetworkProtocol]
    #     PXE or Apple NetBoot over IPv4.
    IP_V4 = NetworkProtocol.new('IP_V4')

    # @!attribute [rw] ip_v6
    #     @return [Com::Vmware::Vcenter::Vm::Hardware::Boot::NetworkProtocol]
    #     PXE over IPv6.
    IP_V6 = NetworkProtocol.new('IP_V6')

end

- (Com::Vmware::Vcenter::Vm::Hardware::Boot::NetworkProtocol) ip_v6

PXE over IPv6.

Returns:

  • (Com::Vmware::Vcenter::Vm::Hardware::Boot::NetworkProtocol)


412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware.rb', line 412

class NetworkProtocol < VAPI::Bindings::VapiEnum

    class << self
        # Holds (gets or creates) the binding type metadata for this enumeration type.
        # @scope class
        # @return [VAPI::Bindings::EnumType] the binding type
        def binding_type
            @binding_type ||= VAPI::Bindings::EnumType.new(
                'com.vmware.vcenter.vm.hardware.boot.network_protocol',
                NetworkProtocol)
        end

        # Converts from a string value (perhaps off the wire) to an instance
        # of this enum type.
        # @param value [String] the actual value of the enum instance
        # @return [NetworkProtocol] the instance found for the value, otherwise
        #         an unknown instance will be built for the value
        def from_string(value)
            begin
                const_get(value)
            rescue NameError
                NetworkProtocol.new('UNKNOWN', value)
            end
        end
    end

    private

    # Constructs a new instance.
    # @param value [String] the actual value of the enum instance
    # @param unknown [String] the unknown value when value is 'UKNOWN'
    def initialize(value, unknown=nil)
        super(self.class.binding_type, value, unknown)
    end

    public

    # @!attribute [rw] ip_v4
    #     @return [Com::Vmware::Vcenter::Vm::Hardware::Boot::NetworkProtocol]
    #     PXE or Apple NetBoot over IPv4.
    IP_V4 = NetworkProtocol.new('IP_V4')

    # @!attribute [rw] ip_v6
    #     @return [Com::Vmware::Vcenter::Vm::Hardware::Boot::NetworkProtocol]
    #     PXE over IPv6.
    IP_V6 = NetworkProtocol.new('IP_V6')

end

Class Method Details

+ (VAPI::Bindings::EnumType) binding_type

Holds (gets or creates) the binding type metadata for this enumeration type.

Returns:

  • (VAPI::Bindings::EnumType)

    the binding type



418
419
420
421
422
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware.rb', line 418

def binding_type
    @binding_type ||= VAPI::Bindings::EnumType.new(
        'com.vmware.vcenter.vm.hardware.boot.network_protocol',
        NetworkProtocol)
end

+ (NetworkProtocol) from_string(value)

Converts from a string value (perhaps off the wire) to an instance of this enum type.

Parameters:

  • value (String)

    the actual value of the enum instance

Returns:

  • (NetworkProtocol)

    the instance found for the value, otherwise an unknown instance will be built for the value



429
430
431
432
433
434
435
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware.rb', line 429

def from_string(value)
    begin
        const_get(value)
    rescue NameError
        NetworkProtocol.new('UNKNOWN', value)
    end
end