1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
"""examples.basic_usage.iosxe_driver"""
from scrapli.driver.core import IOSXEDriver
MY_DEVICE = {
"host": "172.18.0.11",
"auth_username": "scrapli",
"auth_password": "scrapli",
"auth_strict_key": False,
}
def main():
"""Simple example of connecting to an IOSXEDevice with the IOSXEDriver"""
with IOSXEDriver(**MY_DEVICE) as conn:
# Platform drivers will auto-magically handle disabling paging for you
result = conn.send_command("show run")
print(result.result)
if __name__ == "__main__":
main()
|