Class List Method List File List

# Class: Com::Vmware::Vcenter::Vm::Hardware::Adapter::Sata

Inherits:
  VAPI::Bindings::VapiService
  - Object
  - VAPI::Bindings::VapiService
  - Com::Vmware::Vcenter::Vm::Hardware::Adapter::Sata
  show all
Defined in:
  /build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware/adapter.rb

## Overview

The ``Com::Vmware::Vcenter::Vm::Hardware::Adapter::Sata`` class provides methods for configuring the virtual SATA adapters of a virtual machine.

## Defined Under Namespace

Classes: CreateSpec, Info, Summary, Type

## Constant Summary

RESOURCE_TYPE =

      'com.vmware.vcenter.vm.hardware.SataAdapter'

## Instance Method Summary (collapse)

- - (String) create(vm, spec)

  Adds a virtual SATA adapter to the virtual machine.

- - (Void) delete(vm, adapter)

  Removes a virtual SATA adapter from the virtual machine.

- - (Com::Vmware::Vcenter::Vm::Hardware::Adapter::Sata::Info) get(vm, adapter)

  Returns information about a virtual SATA adapter.

- - (Sata) initialize(config) constructor

  Constructs a new instance.

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

  Returns commonly used information about the virtual SATA adapters belonging to the virtual machine.

## Constructor Details

### - (`Sata`) initialize(config)

Constructs a new instance.

Parameters:

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

  A hash with the api provider details.

    128
    129
    130
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware/adapter.rb', line 128

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

## Instance Method Details

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

Adds a virtual SATA adapter to the virtual machine.

Parameters:

- vm (`String`) —

  Virtual machine identifier.

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

  Specification for the new virtual SATA adapter.

Returns:

- (`String`) —

  Virtual SATA adapter identifier.

Raises:

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

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

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

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

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

  if the virtual machine is suspended

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

  if the virtual machine is not found.

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

  if there are no more available SATA buses on the virtual machine.

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

  if the specified SATA bus or PCI address is in use.

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

  if the specified SATA bus or PCI address is out of bounds.

- (`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.

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

  if the guest operating system of the virtual machine is not supported and spec includes nil fields that default to guest-specific values.

    222
    223
    224
    225
    226
    227
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware/adapter.rb', line 222

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

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

Removes a virtual SATA adapter from the virtual machine.

Parameters:

- vm (`String`) —

  Virtual machine identifier.

- adapter (`String`) —

  Virtual SATA adapter 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::NotAllowedInCurrentState`) —

  if the virtual machine is suspended

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

  if the virtual machine or virtual SATA adapter is not found.

- (`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.

    253
    254
    255
    256
    257
    258
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware/adapter.rb', line 253

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

### - (`Com::Vmware::Vcenter::Vm::Hardware::Adapter::Sata::Info`) get(vm, adapter)

Returns information about a virtual SATA adapter.

Parameters:

- vm (`String`) —

  Virtual machine identifier.

- adapter (`String`) —

  Virtual SATA adapter identifier.

Returns:

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

  Information about the specified virtual SATA adapter.

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 SATA adapter 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.

    180
    181
    182
    183
    184
    185
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware/adapter.rb', line 180

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

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

Returns commonly used information about the virtual SATA adapters belonging to the virtual machine.

Parameters:

- vm (`String`) —

  Virtual machine identifier.

Returns:

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

  List of commonly used information about virtual SATA adapters.

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.

    153
    154
    155
    156
    157
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware/adapter.rb', line 153

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