Class: Ansible::Ruby::Modules::Cli_command

Inherits:
Base show all
Defined in:
lib/ansible/ruby/modules/generated/network/cli/cli_command.rb

Overview

Sends a command to a network device and returns the result read from the device.

Instance Method Summary collapse

Methods inherited from Base

#ansible_name, #to_h

Methods inherited from Ansible::Ruby::Models::Base

attr_option, attr_options, attribute, fix_inclusion, #initialize, remove_existing_validations, #to_h, validates

Constructor Details

This class inherits a constructor from Ansible::Ruby::Models::Base

Instance Method Details

#answerArray<String>, ...

Returns The answer to reply with if I(prompt) is matched. The value can be a single answer or a list of answer for multiple prompts. In case the command execution results in multiple prompts the sequence of the prompt and excepted answer should be in same order.

Returns:

  • (Array<String>, String, nil)

    The answer to reply with if I(prompt) is matched. The value can be a single answer or a list of answer for multiple prompts. In case the command execution results in multiple prompts the sequence of the prompt and excepted answer should be in same order.



20
# File 'lib/ansible/ruby/modules/generated/network/cli/cli_command.rb', line 20

attribute :answer

#check_allSymbol?

Returns By default if any one of the prompts mentioned in C(prompt) option is matched it won’t check for other prompts. This boolean flag, that when set to I(True) will check for all the prompts mentioned in C(prompt) option in the given order. If the option is set to I(True) all the prompts should be received from remote host if not it will result in timeout.

Returns:

  • (Symbol, nil)

    By default if any one of the prompts mentioned in C(prompt) option is matched it won’t check for other prompts. This boolean flag, that when set to I(True) will check for all the prompts mentioned in C(prompt) option in the given order. If the option is set to I(True) all the prompts should be received from remote host if not it will result in timeout.



28
# File 'lib/ansible/ruby/modules/generated/network/cli/cli_command.rb', line 28

attribute :check_all

#commandString

Returns The command to send to the remote network device. The resulting output from the command is returned, unless I(sendonly) is set.

Returns:

  • (String)

    The command to send to the remote network device. The resulting output from the command is returned, unless I(sendonly) is set.



12
# File 'lib/ansible/ruby/modules/generated/network/cli/cli_command.rb', line 12

attribute :command

#promptArray<String>, ...

Returns A single regex pattern or a sequence of patterns to evaluate the expected prompt from I(command).

Returns:

  • (Array<String>, String, nil)

    A single regex pattern or a sequence of patterns to evaluate the expected prompt from I(command).



16
# File 'lib/ansible/ruby/modules/generated/network/cli/cli_command.rb', line 16

attribute :prompt

#sendonlySymbol?

Returns The boolean value, that when set to true will send I(command) to the device but not wait for a result.

Returns:

  • (Symbol, nil)

    The boolean value, that when set to true will send I(command) to the device but not wait for a result.



24
# File 'lib/ansible/ruby/modules/generated/network/cli/cli_command.rb', line 24

attribute :sendonly