Question: Create a memory function that returns the processor board ID 1 . Start with blank _ function.py . ` ` ` #blank _ function.py ##
Create a memory function that returns the processor board ID
Start with blankfunction.py
#blankfunction.py
##
#a basic program to create an initial login to a cisco device
##
#
import re
from netmiko import ConnectHandler
cisco
'devicetype': 'ciscoios',
ip: xxxx
'username': xxxxxxx
'password': xxxxxxx
#create SSH socket to connect to device using the data in the library 'cisco'
netconnect ConnectHandlercisco
printnetconnect.findprompt
# disable paging
netconnect.disablepaging
# get sw version info, save as string object 'version'
searchtext netconnect.sendcommandsomecommand'
def functioninputtext:
#do stuff
#do more stuff
return
#pass 'searchtext' into function
#save the output return of function as 'variablename'
variablename functionsearchtext
printvariablename
Capture the output of the 'Show Version' command.
version netconnect.sendcommandshow version'
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
