Class: Com::Vmware::Vcenter::Vm::HardwareService::UpgradePolicy

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

Overview

The ``Com::Vmware::Vcenter::Vm::Hardware::UpgradePolicy`` enumerated type defines the valid virtual hardware upgrade policies for a virtual machine.

Constant Summary

NEVER =
UpgradePolicy.new('NEVER')
AFTER_CLEAN_SHUTDOWN =
UpgradePolicy.new('AFTER_CLEAN_SHUTDOWN')
ALWAYS =
UpgradePolicy.new('ALWAYS')

Instance Attribute Summary (collapse)

Class Method Summary (collapse)

Instance Attribute Details

- (Com::Vmware::Vcenter::Vm::Hardware::UpgradePolicy) after_clean_shutdown

Run scheduled upgrade when the virtual machine is powered on after a clean shutdown of the guest operating system.

Returns:

  • (Com::Vmware::Vcenter::Vm::Hardware::UpgradePolicy)


439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm.rb', line 439

class UpgradePolicy < 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.upgrade_policy',
                UpgradePolicy)
        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 [UpgradePolicy] 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
                UpgradePolicy.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] never
    #     @return [Com::Vmware::Vcenter::Vm::Hardware::UpgradePolicy]
    #     Do not upgrade the virtual machine when it is powered on.
    NEVER = UpgradePolicy.new('NEVER')

    # @!attribute [rw] after_clean_shutdown
    #     @return [Com::Vmware::Vcenter::Vm::Hardware::UpgradePolicy]
    #     Run scheduled upgrade when the virtual machine is powered on after a clean shutdown of the guest operating system.
    AFTER_CLEAN_SHUTDOWN = UpgradePolicy.new('AFTER_CLEAN_SHUTDOWN')

    # @!attribute [rw] always
    #     @return [Com::Vmware::Vcenter::Vm::Hardware::UpgradePolicy]
    #     Run scheduled upgrade when the virtual machine is powered on.
    ALWAYS = UpgradePolicy.new('ALWAYS')

end

- (Com::Vmware::Vcenter::Vm::Hardware::UpgradePolicy) always

Run scheduled upgrade when the virtual machine is powered on.

Returns:

  • (Com::Vmware::Vcenter::Vm::Hardware::UpgradePolicy)


439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm.rb', line 439

class UpgradePolicy < 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.upgrade_policy',
                UpgradePolicy)
        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 [UpgradePolicy] 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
                UpgradePolicy.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] never
    #     @return [Com::Vmware::Vcenter::Vm::Hardware::UpgradePolicy]
    #     Do not upgrade the virtual machine when it is powered on.
    NEVER = UpgradePolicy.new('NEVER')

    # @!attribute [rw] after_clean_shutdown
    #     @return [Com::Vmware::Vcenter::Vm::Hardware::UpgradePolicy]
    #     Run scheduled upgrade when the virtual machine is powered on after a clean shutdown of the guest operating system.
    AFTER_CLEAN_SHUTDOWN = UpgradePolicy.new('AFTER_CLEAN_SHUTDOWN')

    # @!attribute [rw] always
    #     @return [Com::Vmware::Vcenter::Vm::Hardware::UpgradePolicy]
    #     Run scheduled upgrade when the virtual machine is powered on.
    ALWAYS = UpgradePolicy.new('ALWAYS')

end

- (Com::Vmware::Vcenter::Vm::Hardware::UpgradePolicy) never

Do not upgrade the virtual machine when it is powered on.

Returns:

  • (Com::Vmware::Vcenter::Vm::Hardware::UpgradePolicy)


439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm.rb', line 439

class UpgradePolicy < 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.upgrade_policy',
                UpgradePolicy)
        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 [UpgradePolicy] 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
                UpgradePolicy.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] never
    #     @return [Com::Vmware::Vcenter::Vm::Hardware::UpgradePolicy]
    #     Do not upgrade the virtual machine when it is powered on.
    NEVER = UpgradePolicy.new('NEVER')

    # @!attribute [rw] after_clean_shutdown
    #     @return [Com::Vmware::Vcenter::Vm::Hardware::UpgradePolicy]
    #     Run scheduled upgrade when the virtual machine is powered on after a clean shutdown of the guest operating system.
    AFTER_CLEAN_SHUTDOWN = UpgradePolicy.new('AFTER_CLEAN_SHUTDOWN')

    # @!attribute [rw] always
    #     @return [Com::Vmware::Vcenter::Vm::Hardware::UpgradePolicy]
    #     Run scheduled upgrade when the virtual machine is powered on.
    ALWAYS = UpgradePolicy.new('ALWAYS')

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



445
446
447
448
449
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm.rb', line 445

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

+ (UpgradePolicy) 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:

  • (UpgradePolicy)

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



456
457
458
459
460
461
462
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm.rb', line 456

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