From: https://pyneng.readthedocs.io/en/latest/book/18_ssh_telnet/netmiko.html
Netmiko has several ways to send commands:
send_command - send one command
send_config_set - send list of commands or command in configuration mode
send_config_from_file - send commands from the file (uses send_config_set method inside)
send_command_timing - send command and wait for the output based on timer
All the best.
Answer is still C+E
I just want to add that almost any configuration done in cisco devices implies accessing a submenu and sending a line like:
config terminal
interface loopback1
address XXX XXXX
So send_command is for "one-liners", you can do a "write" or "mkdir" but you need to handle the messages of confirmation, which is totally doable but more complicated than a "show", which is the best use of this send_command.
C+E are correct. send_command() is for read-only commands.
https://pyneng.readthedocs.io/en/latest/book/18_ssh_telnet/netmiko.html
See "sending commands" section
def send_command
(
self, command_string, expect_string=None, delay_factor=1, max_loops=500, auto_find_prompt=True, strip_prompt=True, strip_command=True, normalize=True, use_textfsm=False, textfsm_template=None, use_ttp=False, ttp_template=None, use_genie=False, cmd_verify=True)
Execute command_string on the SSH channel using a pattern-based mechanism. Generally used for show commands. By default this method will keep waiting to receive data until the network device prompt is detected. The current network device prompt will be determined automatically.
it says send_command() is generally used for show commands. So I believe C and E are correct
upvoted 5 times
...
...
This section is not available anymore. Please use the main Exam Page.300-435 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Cheam
7 months, 3 weeks agolente_kriebels
8 months, 2 weeks agoWocilon
2 years, 11 months agofergbot
3 years, 5 months agolmh
3 years, 5 months agoNecro20
2 years, 8 months agoAudi87
3 years, 5 months ago