Caveats
As napalm-ros uses API, several caveats exist.
- API is not versioned so things may break when routeros is upgraded.
- RouterOS has no native, non-reboot commit/rollback and safe mode is not exposed via the API. Rollback is emulated with a device-side scheduler that restores a backup, so a rollback (or an expired commit-confirm) reverts by rebooting. See Configuration management.
get_configreads the running configuration over the binary API on RouterOS 7 (no SSH). On RouterOS 6 it falls back to SSH (paramiko), where paramiko offers keys from a running SSH agent by default; if the agent offers a key the device rejects, RouterOS may drop the session andget_configthen fails withNo existing session. Passoptional_args={'paramiko_allow_agent': False}to authenticate with the password only (SSH agent/key auth is otherwise left enabled);paramiko_look_for_keys(defaultFalse) similarly controls on-disk key lookup.
Configuration management
Configuration management is supported on RouterOS 7.x and is implemented entirely over the binary API (via librouteros), so it needs no SSH access. It requires librouteros >= 4.2.2, which carries the /file/add fix commit_config relies on to apply a candidate on RouterOS older than ~7.13.
get_config/compare_configread the running configuration with/export.load_merge_candidatestages a.rscscript that is applied with/import.load_replace_candidatestages a full configuration.commit_configapplies the candidate. Before a plain commit a backup is taken sorollbackcan restore it (by rebooting).commit_config(revert_in=<seconds>)arms a device-side scheduler that restores that backup unlessconfirm_commitis called in time (has_pending_commitreports whether one is armed). Because the timer lives on the device it survives a lost session or a lock-out.- A replace (
load_replace_candidate+commit_config) uses/system reset-configuration run-after-reset, which wipes the configuration and reboots into the candidate. It is destructive, has no automatic rollback, and the candidate must be a complete, self-consistent configuration that restores management connectivity. Commit-confirm (revert_in) is not available with a replace.
RouterOS configuration is imperative (an /export is a list of add/set actions, not declarative state) and ordering matters in some paths (e.g. /ip firewall filter) but not others (e.g. /ip address). compare_config is therefore a textual diff for review, not an executable patch.
Implemented getters
- get_arp_table
- get_interfaces_counters
- get_environment
- get_facts
- get_interfaces
- get_interfaces_ip
- get_ntp_servers
- get_snmp_information
- get_users
- get_ipv6_neighbors_table
- is_alive
- ping
- get_lldp_neighbors
- get_lldp_neighbors_detail
- get_network_instances
- get_mac_address_table
- get_bgp_neighbors
- get_bgp_neighbors_detail
- get_config
- get_vlans
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file napalm_ros-1.4.0.tar.gz.
File metadata
- Download URL: napalm_ros-1.4.0.tar.gz
- Upload date:
- Size: 15.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
poetry/2.4.3 CPython/3.12.3 Linux/6.17.0-1022-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc0d7570b51fa9104c47b284bdca2598c4899be4c6587fea434868b346b68916
|
|
| MD5 |
84329860053b5748352b25766578281f
|
|
| BLAKE2b-256 |
276c8ca7938709320a9949b37006ea907424af15ebd64cf8fea629cc51764237
|
File details
Details for the file napalm_ros-1.4.0-py3-none-any.whl.
File metadata
- Download URL: napalm_ros-1.4.0-py3-none-any.whl
- Upload date:
- Size: 15.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
poetry/2.4.3 CPython/3.12.3 Linux/6.17.0-1022-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
282e66199488d0fe5a70461822d5179155f20083f38ab734595feab1da67dcfa
|
|
| MD5 |
02fe2bcce7afc0d1e97c9e0101643807
|
|
| BLAKE2b-256 |
c4cd46c82653b63c3837c427fa6baec2a25b8f9217f168bdbb1aef6ee8d9c54c
|