Class List Method List File List

# Class: Com::Vmware::Vapi::Metadata::Cli::Command

Inherits:
  VAPI::Bindings::VapiService
  - Object
  - VAPI::Bindings::VapiService
  - Com::Vmware::Vapi::Metadata::Cli::Command
  show all
Defined in:
  /build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/cli.rb

## Overview

The ``Com::Vmware::Vapi::Metadata::Cli::Command`` class provides methods to get information about command line interface (CLI) commands.

## Defined Under Namespace

Classes: FormatterType, GenericType, Identity, Info, OptionInfo, OutputFieldInfo, OutputInfo

## Instance Method Summary (collapse)

- - (String) fingerprint

  Returns the aggregate fingerprint of all the command metadata from all the metadata sources.

- - (Com::Vmware::Vapi::Metadata::Cli::Command::Info) get(identity)

  Retrieves information about a command including information about how to execute that command.

- - (Command) initialize(config) constructor

  Constructs a new instance.

- - (Array<Com::Vmware::Vapi::Metadata::Cli::Command::Identity>) list(path = nil)

  Returns the identifiers of all commands, or commands in a specific namespace.

## Constructor Details

### - (`Command`) initialize(config)

Constructs a new instance.

Parameters:

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

  A hash with the api provider details.

    75
    76
    77
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/cli.rb', line 75

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

## Instance Method Details

### - (`String`) fingerprint

Returns the aggregate fingerprint of all the command metadata from all the metadata sources.

     The fingerprint provides clients an efficient way to check if the metadata for commands has been modified on the server.

Returns:

- (`String`) —

  Fingerprint of all the command metadata present on the server.

    117
    118
    119
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/cli.rb', line 117

    def fingerprint()
        invoke_with_info(@@fingerprint_info)
    end

### - (`Com::Vmware::Vapi::Metadata::Cli::Command::Info`) get(identity)

Retrieves information about a command including information about how to execute that command.

Parameters:

- identity (`Com::Vmware::Vapi::Metadata::Cli::Command::Identity`) —

  Identifier of the command for which to retreive information.

Returns:

- (`Com::Vmware::Vapi::Metadata::Cli::Command::Info`) —

  Information about the command including information about how to execute that command.

Raises:

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

  if a command corresponding to ``identity`` doesn’t exist.

    104
    105
    106
    107
    108
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/cli.rb', line 104

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

### - (`Array<Com::Vmware::Vapi::Metadata::Cli::Command::Identity>`) list(path = nil)

Returns the identifiers of all commands, or commands in a specific namespace.

Parameters:

- path (`String`, `nil`) (defaults to: `nil`) —

  The dot-separated path of the namespace for which command identifiers should be returned. If nil identifiers of all commands registered with the infrastructure will be returned.

Returns:

- (`Array<Com::Vmware::Vapi::Metadata::Cli::Command::Identity>`) —

  Identifiers of the requested commands.

Raises:

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

  if a namespace corresponding to ``path`` doesn’t exist.

    89
    90
    91
    92
    93
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/cli.rb', line 89

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