Class List Method List File List

# Class: Com::Vmware::Appliance::Networking::Interfaces

Inherits:
  VAPI::Bindings::VapiService
  - Object
  - VAPI::Bindings::VapiService
  - Com::Vmware::Appliance::Networking::Interfaces
  show all
Defined in:
  /build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/appliance/networking.rb

## Overview

``Com::Vmware::Appliance::Networking::Interfaces`` class provides methods Provides information about network interface.

## Defined Under Namespace

Classes: InterfaceInfo, InterfaceStatus

## Instance Method Summary (collapse)

- - (Com::Vmware::Appliance::Networking::Interfaces::InterfaceInfo) get(interface_name)

  Get information about a particular network interface.

- - (Interfaces) initialize(config) constructor

  Constructs a new instance.

- - (Array<Com::Vmware::Appliance::Networking::Interfaces::InterfaceInfo>) list

  Get list of available network interfaces, including those that are not yet configured.

## Constructor Details

### - (`Interfaces`) initialize(config)

Constructs a new instance.

Parameters:

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

  A hash with the api provider details.

    62
    63
    64
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/appliance/networking.rb', line 62

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

## Instance Method Details

### - (`Com::Vmware::Appliance::Networking::Interfaces::InterfaceInfo`) get(interface_name)

Get information about a particular network interface.

Parameters:

- interface_name (`String`) —

  Network interface, for example, “nic0”.

Returns:

- (`Com::Vmware::Appliance::Networking::Interfaces::InterfaceInfo`) —

  Network interface information.

Raises:

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

  Generic error

    86
    87
    88
    89
    90
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/appliance/networking.rb', line 86

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

### - (`Array<Com::Vmware::Appliance::Networking::Interfaces::InterfaceInfo>`) list

Get list of available network interfaces, including those that are not yet configured.

Returns:

- (`Array<Com::Vmware::Appliance::Networking::Interfaces::InterfaceInfo>`) —

  List of InterfaceInfo structures.

Raises:

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

  Generic error

    73
    74
    75
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/appliance/networking.rb', line 73

    def list()
        invoke_with_info(@@list_info)
    end