Python Network Programming Techniques by Marcel Neidinger

Python Network Programming Techniques by Marcel Neidinger

Author:Marcel Neidinger
Language: eng
Format: mobi, epub
Publisher: Packt Publishing Limited
Published: 2021-08-13T00:00:00+00:00


How to do it…

The following steps demonstrate how to connect to a device and retrieve some facts about it using the getters that NAPALM provides:

Import the napalm module:import napalm

From the napalm module, retrieve the approprtiate driver for your device's vendor. Please refer to the How it works… section of the Connecting to devices from different vendors using NAPALM recipe for a list of possible drivers:driver = napalm.get_network_driver("<insert driver name>")

Specify the connection details of your device. Note that you can pass a non-standard port in the optional arguments. If your device connects on the standard port, you can omit this:conn_details = {

"hostname": "<insert hostname>",

"username": "<insert username>",

"password": "<insert password>",

"optional_args": {

"port": <insert port as integer>

}

}



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.