driver / lint (pull_request) Successful in 13s
driver / standard (pull_request) Successful in 16s
driver / types (pull_request) Successful in 59s
driver / test (3.13) (pull_request) Successful in 52s
driver / test (3.12) (pull_request) Successful in 1m1s
driver / lowest (pull_request) Successful in 26s
driver / build (pull_request) Successful in 27s
driver / security (pull_request) Successful in 58s
CI / driver (pull_request) Successful in 2m6s
driver / publish (pull_request) Skipped
netOrk aligns every device's NTP servers and time zone with its site's (NetOrk/netork#2360, #2366). A JetStream keeps both in one line, system-time ntp <zone> <primary> <backup> <hours>, with the zone as a UTC offset from a fixed list and summer time in a system-time dst line of its own. get_time_sync() reads the servers from that line and the zone as None: the switch keeps no name to map back. configure_time_sync() writes an IANA zone as its offset and a dst recurring rule from the zone's POSIX rule (posix_tz/parse_posix_tz), and refuses before sending anything what the switch cannot take: more than two servers, anything but IPv4 addresses, an offset it does not offer, a change outside HH:MM of a day. Servers and zone share the ntp line, so a call with both writes it once. A change is saved to the startup configuration; values the switch already has are not sent again, so the alignment on every poll does not churn. The code lives in time_sync.py; get_ntp_servers() now reads through it, so the driver file shrinks (1999 -> 1987 lines).
88 lines
2.0 KiB
Markdown
88 lines
2.0 KiB
Markdown
# napalm-tplink-jetstream
|
|
|
|
NAPALM community driver for **TP-Link Jetstream** managed switches (T1500G, T1600G, T2600G, T3700G and compatible series).
|
|
|
|
## Tested devices
|
|
|
|
| Model | Series | Tested |
|
|
|---|---|---|
|
|
| TL-SG2210P | Jetstream Smart | ✅ |
|
|
| TL-SG3210 | Jetstream Smart | ✅ |
|
|
|
|
> More devices from the T1500G, T1600G, T2600G and T3700G series should work as well — contributions welcome.
|
|
|
|
## Requirements
|
|
|
|
| Dependency | Minimum version |
|
|
|---|---|
|
|
| Python | 3.12 |
|
|
| NAPALM | 4.0 |
|
|
| Netmiko | 4.0 |
|
|
|
|
## Installation
|
|
|
|
```bash
|
|
pip install napalm-tplink-jetstream
|
|
```
|
|
|
|
Or from source:
|
|
|
|
```bash
|
|
git clone https://git.netork.io/NAPALM/napalm-tplink-jetstream
|
|
cd napalm-tplink-jetstream
|
|
pip install -e .
|
|
```
|
|
|
|
## Quick start
|
|
|
|
```python
|
|
from napalm import get_network_driver
|
|
|
|
driver = get_network_driver("tplink_jetstream")
|
|
with driver("192.168.0.1", "admin", "admin") as device:
|
|
facts = device.get_facts()
|
|
print(facts)
|
|
```
|
|
|
|
## Implemented getters
|
|
|
|
| Getter | Status |
|
|
|---|---|
|
|
| `get_facts` | ✅ |
|
|
| `get_interfaces` | ✅ |
|
|
| `get_interfaces_ip` | ✅ |
|
|
| `get_config` | ✅ |
|
|
| `get_arp_table` | ✅ |
|
|
| `get_mac_address_table` | ✅ |
|
|
| `get_lldp_neighbors` | ✅ |
|
|
| `get_lldp_neighbors_detail` | ✅ |
|
|
| `get_vlans` | ✅ |
|
|
| `get_ntp_servers` | ✅ |
|
|
| `get_time_sync` / `configure_time_sync` | ✅ Up to 2 IPv4 servers; the zone as a UTC offset and a summer-time rule (read back as `None`) |
|
|
| `cli` | ✅ |
|
|
| `is_alive` | ✅ |
|
|
| `get_bgp_neighbors` | ❌ Not applicable |
|
|
| `load_replace_candidate` | ❌ Not applicable |
|
|
| `commit_config` | ❌ Not applicable |
|
|
|
|
## Optional arguments
|
|
|
|
| Argument | Default | Description |
|
|
|---|---|---|
|
|
| `port` | `22` | SSH port |
|
|
| `force_no_enable` | `False` | Skip `enable` after login |
|
|
| `canonical_int_fmt` | `False` | Use canonical interface names |
|
|
|
|
Any additional keyword arguments are forwarded to Netmiko.
|
|
|
|
## Development
|
|
|
|
```bash
|
|
pip install -e ".[dev]"
|
|
pytest tests/
|
|
```
|
|
|
|
## License
|
|
|
|
Apache 2.0 — see [LICENSE](LICENSE).
|