Class: Com::Vmware::Vcenter::Vm::Power

Inherits:
VAPI::Bindings::VapiService
  • 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::Power`` class provides methods for managing the power state of a virtual machine.

Defined Under Namespace

Classes: Info, State

Instance Method Summary (collapse)

Constructor Details

- (Power) initialize(config)

Constructs a new instance.

Parameters:

  • config (VAPI::Bindings::StubConfig)

    A hash with the api provider details.



686
687
688
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm.rb', line 686

def initialize(config)
    super(config, @@service_info)
end

Instance Method Details

- (Com::Vmware::Vcenter::Vm::Power::Info) get(vm)

Returns the power state information of a virtual machine.

Parameters:

  • vm (String)

    Virtual machine identifier.

Returns:

Raises:



709
710
711
712
713
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm.rb', line 709

def get(vm)
    invoke_with_info(@@get_info, {
        'vm' => vm,
    })
end

- (Void) reset(vm)

Resets a powered-on virtual machine.

Parameters:

  • vm (String)

    Virtual machine identifier.

Returns:

  • (Void)

Raises:



823
824
825
826
827
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm.rb', line 823

def reset(vm)
    invoke_with_info(@@reset_info, {
        'vm' => vm,
    })
end

- (Void) start(vm)

Powers on a powered-off or suspended virtual machine.

Parameters:

  • vm (String)

    Virtual machine identifier.

Returns:

  • (Void)

Raises:



743
744
745
746
747
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm.rb', line 743

def start(vm)
    invoke_with_info(@@start_info, {
        'vm' => vm,
    })
end

- (Void) stop(vm)

Powers off a powered-on or suspended virtual machine.

Parameters:

  • vm (String)

    Virtual machine identifier.

Returns:

  • (Void)

Raises:



769
770
771
772
773
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm.rb', line 769

def stop(vm)
    invoke_with_info(@@stop_info, {
        'vm' => vm,
    })
end

- (Void) suspend(vm)

Suspends a powered-on virtual machine.

Parameters:

  • vm (String)

    Virtual machine identifier.

Returns:

  • (Void)

Raises:



797
798
799
800
801
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm.rb', line 797

def suspend(vm)
    invoke_with_info(@@suspend_info, {
        'vm' => vm,
    })
end