Question 43 of 60 from exam 300-435-ENAUTO: Automating and Programming Cisco Enterprise Solutions

Question 43 of 60 from exam 300-435-ENAUTO: Automating and Programming Cisco Enterprise Solutions

Question

# Simple Application to run a few commands on a Cisco Device
ipaddresses = ['192.168.0.1', "192.168.0.5", "10.10.10.10"]
username = "admin"

password = "cisco123"

commands _to_run=["show ver", "show ip interface brief")
Debug = True

for device in ipaddresses:
print ("Logging into "+device+", using "+username+"/"+password)

# We want to execute commands on our device only if Debug=True

for commands in commands to_run:
print (" Executing "+commands+" on device: "+device)

Refer to the exhibit.

What is the expected output from the Python code? A.

Logging into 192.168.0.1, using admin/cisco123
Logging into 192.168.0.5, using admin/ciscol23
Logging into 10.10.10.10, using admin/cisco123

Executing
Executing
Executing
Executing
Executing
Executing

show
show
show
show
show
show

ver on device: 192.168.0.1
ip interface brief on device: 192.168.0.1
ver on device: 192.168.0.5
ip interface brief on device: 192.168.0.5
ver on device: 10.10.10.10
ip interface brief on device: 10.10.10.10

B.

Logging into 192.168.0.1, using admin/cisco123
Logging into 192.168.0.5, using admin/cisco123
Logging into 10.10.10.10, using admin/cisco123

C.

Simple Application to run a few commands on a Cisco Device
Loggig into 192.168.0.1, using admin/cisco123
We want to execute commands on our device only if Debug=True
Executing show ver on device: 192.168.0.1
Executing show ip interface brief on device: 192.168.0.1
Logging into 192.168.0.5, using admin/cisco123
We want to execute commands on our device only if Debug=True
Executing show ver on device: 192.168.0.5
Executing show ip interface brief on device: 192.168.0.5
Logging into 10.10.10.10, using admin/cisco123
We want to execute commands on our device only if Debug=True
Executing show ver on device: 10.10.10.10
Executing show ip interface brief on device: 10.10.10.10

D.

Logging into 192.168.0.1, using admin/cisco123

Executing show ver on device: 192.168.0.1

Executing show ip interface brief on device: 192.168.0.1
Logging into 192.168.0.5, using admin/ciscol23

Executing show ver on device: 192.168.0.5

Executing show ip interface brief on device: 192.168.0.5
Logging into 10.10.10.10, using admin/cisco123

Executing show ver on device: 10.10.10.10

Executing show ip interface brief on device: 10.10.10.10

Explanations

D.