Class List Method List File List

# Class: Com::Vmware::Vcenter::Vm::Hardware::Parallel

Inherits:
  VAPI::Bindings::VapiService
  - Object
  - VAPI::Bindings::VapiService
  - Com::Vmware::Vcenter::Vm::Hardware::Parallel
  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::Parallel`` class provides methods for configuring the virtual parallel ports of a virtual machine.

## Defined Under Namespace

Classes: BackingInfo, BackingSpec, BackingType, CreateSpec, Info, Summary, UpdateSpec

## Constant Summary

RESOURCE_TYPE =

      'com.vmware.vcenter.vm.hardware.ParallelPort'

## Instance Method Summary (collapse)

- - (Void) connect(vm, port)

  Connects a virtual parallel port of a powered-on virtual machine to its backing.

- - (String) create(vm, spec)

  Adds a virtual parallel port to the virtual machine.

- - (Void) delete(vm, port)

  Removes a virtual parallel port from the virtual machine.

- - (Void) disconnect(vm, port)

  Disconnects a virtual parallel port of a powered-on virtual machine from its backing.

- - (Com::Vmware::Vcenter::Vm::Hardware::Parallel::Info) get(vm, port)

  Returns information about a virtual parallel port.

- - (Parallel) initialize(config) constructor

  Constructs a new instance.

- - (Array<Com::Vmware::Vcenter::Vm::Hardware::Parallel::Summary>) list(vm)

  Returns commonly used information about the virtual parallel ports belonging to the virtual machine.

- - (Void) update(vm, port, spec)

  Updates the configuration of a virtual parallel port.

## Constructor Details

### - (`Parallel`) initialize(config)

Constructs a new instance.

Parameters:

- config (`VAPI::Bindings::StubConfig`) —

  A hash with the api provider details.

    4434
    4435
    4436
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware.rb', line 4434

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

## Instance Method Details

### - (`Void`) connect(vm, port)

Connects a virtual parallel port of a powered-on virtual machine to its backing. Connecting the virtual device makes the backing accessible from the perspective of the guest operating system.

     For a powered-off virtual machine, the   :func:`Com::Vmware::Vcenter::Vm::Hardware::Parallel.update`    method  may be used to configure the virtual parallel port to start in the connected state when the virtual machine is powered on.

Parameters:

- vm (`String`) —

  Virtual machine identifier.

- port (`String`) —

  Virtual parallel port identifier.

Returns:

- (`Void`)

Raises:

- (`Com::Vmware::Vapi::Std::Errors::Error`) —

  if the system reports an error while responding to the request.

- (`Com::Vmware::Vapi::Std::Errors::NotFound`) —

  if the virtual machine or virtual parallel port is not found.

- (`Com::Vmware::Vapi::Std::Errors::AlreadyInDesiredState`) —

  if the virtual parallel port is already connected.

- (`Com::Vmware::Vapi::Std::Errors::NotAllowedInCurrentState`) —

  if the virtual machine is not powered on.

- (`Com::Vmware::Vapi::Std::Errors::ResourceBusy`) —

  if the virtual machine is busy performing another operation.

- (`Com::Vmware::Vapi::Std::Errors::ResourceInaccessible`) —

  if the virtual machine’s configuration state cannot be accessed.

- (`Com::Vmware::Vapi::Std::Errors::ServiceUnavailable`) —

  if the system is unable to communicate with a service to complete the request.

- (`Com::Vmware::Vapi::Std::Errors::Unauthenticated`) —

  if the user can not be authenticated.

- (`Com::Vmware::Vapi::Std::Errors::Unauthorized`) —

  if the user doesn’t have the required privileges.

    4622
    4623
    4624
    4625
    4626
    4627
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware.rb', line 4622

    def connect(vm, port)
        invoke_with_info(@@connect_info, {
            'vm' => vm,
            'port' => port,
        })
    end

### - (`String`) create(vm, spec)

Adds a virtual parallel port to the virtual machine.

Parameters:

- vm (`String`) —

  Virtual machine identifier.

- spec (`Com::Vmware::Vcenter::Vm::Hardware::Parallel::CreateSpec`) —

  Specification for the new virtual parallel port.

Returns:

- (`String`) —

  Virtual parallel port identifier.

Raises:

- (`Com::Vmware::Vapi::Std::Errors::Error`) —

  if the system reported that the parallel port device was created but was unable to confirm the creation because the identifier of the new device could not be determined.

- (`Com::Vmware::Vapi::Std::Errors::Error`) —

  if the system reports an error while responding to the request.

- (`Com::Vmware::Vapi::Std::Errors::NotFound`) —

  if the virtual machine is not found.

- (`Com::Vmware::Vapi::Std::Errors::NotAllowedInCurrentState`) —

  if the virtual machine is not powered off.

- (`Com::Vmware::Vapi::Std::Errors::UnableToAllocateResource`) —

  if the virtual machine already has the maximum number of supported parallel ports.

- (`Com::Vmware::Vapi::Std::Errors::ResourceBusy`) —

  if the virtual machine is busy performing another operation.

- (`Com::Vmware::Vapi::Std::Errors::ResourceInaccessible`) —

  if the virtual machine’s configuration state cannot be accessed.

- (`Com::Vmware::Vapi::Std::Errors::ServiceUnavailable`) —

  if the system is unable to communicate with a service to complete the request.

- (`Com::Vmware::Vapi::Std::Errors::Unauthenticated`) —

  if the user can not be authenticated.

- (`Com::Vmware::Vapi::Std::Errors::Unauthorized`) —

  if the user doesn’t have the required privileges.

    4522
    4523
    4524
    4525
    4526
    4527
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware.rb', line 4522

    def create(vm, spec)
        invoke_with_info(@@create_info, {
            'vm' => vm,
            'spec' => spec,
        })
    end

### - (`Void`) delete(vm, port)

Removes a virtual parallel port from the virtual machine.

Parameters:

- vm (`String`) —

  Virtual machine identifier.

- port (`String`) —

  Virtual parallel port identifier.

Returns:

- (`Void`)

Raises:

- (`Com::Vmware::Vapi::Std::Errors::Error`) —

  if the system reports an error while responding to the request.

- (`Com::Vmware::Vapi::Std::Errors::NotFound`) —

  if the virtual machine or virtual parallel port is not found.

- (`Com::Vmware::Vapi::Std::Errors::NotAllowedInCurrentState`) —

  if the virtual machine is not powered off.

- (`Com::Vmware::Vapi::Std::Errors::ResourceBusy`) —

  if the virtual machine is busy performing another operation.

- (`Com::Vmware::Vapi::Std::Errors::ResourceInaccessible`) —

  if the virtual machine’s configuration state cannot be accessed.

- (`Com::Vmware::Vapi::Std::Errors::ServiceUnavailable`) —

  if the system is unable to communicate with a service to complete the request.

- (`Com::Vmware::Vapi::Std::Errors::Unauthenticated`) —

  if the user can not be authenticated.

- (`Com::Vmware::Vapi::Std::Errors::Unauthorized`) —

  if the user doesn’t have the required privileges.

    4587
    4588
    4589
    4590
    4591
    4592
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware.rb', line 4587

    def delete(vm, port)
        invoke_with_info(@@delete_info, {
            'vm' => vm,
            'port' => port,
        })
    end

### - (`Void`) disconnect(vm, port)

Disconnects a virtual parallel port of a powered-on virtual machine from its backing. The virtual device is still present and its backing configuration is unchanged, but from the perspective of the guest operating system, the parallel port is not connected to its backing.

     For a powered-off virtual machine, the   :func:`Com::Vmware::Vcenter::Vm::Hardware::Parallel.update`    method  may be used to configure the virtual parallel port to start in the disconnected state when the virtual machine is powered on.

Parameters:

- vm (`String`) —

  Virtual machine identifier.

- port (`String`) —

  Virtual parallel port identifier.

Returns:

- (`Void`)

Raises:

- (`Com::Vmware::Vapi::Std::Errors::Error`) —

  if the system reports an error while responding to the request.

- (`Com::Vmware::Vapi::Std::Errors::NotFound`) —

  if the virtual machine or virtual parallel port is not found.

- (`Com::Vmware::Vapi::Std::Errors::AlreadyInDesiredState`) —

  if the virtual parallel port is already disconnected.

- (`Com::Vmware::Vapi::Std::Errors::NotAllowedInCurrentState`) —

  if the virtual machine is not powered on.

- (`Com::Vmware::Vapi::Std::Errors::ResourceBusy`) —

  if the virtual machine is busy performing another operation.

- (`Com::Vmware::Vapi::Std::Errors::ResourceInaccessible`) —

  if the virtual machine’s configuration state cannot be accessed.

- (`Com::Vmware::Vapi::Std::Errors::ServiceUnavailable`) —

  if the system is unable to communicate with a service to complete the request.

- (`Com::Vmware::Vapi::Std::Errors::Unauthenticated`) —

  if the user can not be authenticated.

- (`Com::Vmware::Vapi::Std::Errors::Unauthorized`) —

  if the user doesn’t have the required privileges.

    4657
    4658
    4659
    4660
    4661
    4662
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware.rb', line 4657

    def disconnect(vm, port)
        invoke_with_info(@@disconnect_info, {
            'vm' => vm,
            'port' => port,
        })
    end

### - (`Com::Vmware::Vcenter::Vm::Hardware::Parallel::Info`) get(vm, port)

Returns information about a virtual parallel port.

Parameters:

- vm (`String`) —

  Virtual machine identifier.

- port (`String`) —

  Virtual parallel port identifier.

Returns:

- (`Com::Vmware::Vcenter::Vm::Hardware::Parallel::Info`) —

  Information about the specified virtual parallel port.

Raises:

- (`Com::Vmware::Vapi::Std::Errors::Error`) —

  if the system reports an error while responding to the request.

- (`Com::Vmware::Vapi::Std::Errors::NotFound`) —

  if the virtual machine or virtual parallel port is not found.

- (`Com::Vmware::Vapi::Std::Errors::ResourceInaccessible`) —

  if the virtual machine’s configuration state cannot be accessed.

- (`Com::Vmware::Vapi::Std::Errors::ServiceUnavailable`) —

  if the system is unable to communicate with a service to complete the request.

- (`Com::Vmware::Vapi::Std::Errors::Unauthenticated`) —

  if the user can not be authenticated.

- (`Com::Vmware::Vapi::Std::Errors::Unauthorized`) —

  if the user doesn’t have the required privileges.

    4486
    4487
    4488
    4489
    4490
    4491
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware.rb', line 4486

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

### - (`Array<Com::Vmware::Vcenter::Vm::Hardware::Parallel::Summary>`) list(vm)

Returns commonly used information about the virtual parallel ports belonging to the virtual machine.

Parameters:

- vm (`String`) —

  Virtual machine identifier.

Returns:

- (`Array<Com::Vmware::Vcenter::Vm::Hardware::Parallel::Summary>`) —

  List of commonly used information about virtual parallel ports.

Raises:

- (`Com::Vmware::Vapi::Std::Errors::Error`) —

  if the system reports an error while responding to the request.

- (`Com::Vmware::Vapi::Std::Errors::NotFound`) —

  if the virtual machine is not found.

- (`Com::Vmware::Vapi::Std::Errors::ResourceInaccessible`) —

  if the virtual machine’s configuration state cannot be accessed.

- (`Com::Vmware::Vapi::Std::Errors::ServiceUnavailable`) —

  if the system is unable to communicate with a service to complete the request.

- (`Com::Vmware::Vapi::Std::Errors::Unauthenticated`) —

  if the user can not be authenticated.

- (`Com::Vmware::Vapi::Std::Errors::Unauthorized`) —

  if the user doesn’t have the required privileges.

    4459
    4460
    4461
    4462
    4463
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware.rb', line 4459

    def list(vm)
        invoke_with_info(@@list_info, {
            'vm' => vm,
        })
    end

### - (`Void`) update(vm, port, spec)

Updates the configuration of a virtual parallel port.

Parameters:

- vm (`String`) —

  Virtual machine identifier.

- port (`String`) —

  Virtual parallel port identifier.

- spec (`Com::Vmware::Vcenter::Vm::Hardware::Parallel::UpdateSpec`) —

  Specification for updating the virtual parallel port.

Returns:

- (`Void`)

Raises:

- (`Com::Vmware::Vapi::Std::Errors::Error`) —

  if the system reports an error while responding to the request.

- (`Com::Vmware::Vapi::Std::Errors::NotFound`) —

  if the virtual machine or virtual parallel port is not found.

- (`Com::Vmware::Vapi::Std::Errors::NotAllowedInCurrentState`) —

  if one or more of the fields specified in the ``spec`` parameter cannot be modified due to the current power state of the virtual machine or the connection state of the virtual parallel port.

- (`Com::Vmware::Vapi::Std::Errors::ResourceBusy`) —

  if the virtual machine is busy performing another operation.

- (`Com::Vmware::Vapi::Std::Errors::ResourceInaccessible`) —

  if the virtual machine’s configuration state cannot be accessed.

- (`Com::Vmware::Vapi::Std::Errors::ServiceUnavailable`) —

  if the system is unable to communicate with a service to complete the request.

- (`Com::Vmware::Vapi::Std::Errors::Unauthenticated`) —

  if the user can not be authenticated.

- (`Com::Vmware::Vapi::Std::Errors::Unauthorized`) —

  if the user doesn’t have the required privileges.

    4555
    4556
    4557
    4558
    4559
    4560
    4561
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware.rb', line 4555

    def update(vm, port, spec)
        invoke_with_info(@@update_info, {
            'vm' => vm,
            'port' => port,
            'spec' => spec,
        })
    end