uci_ubus_jsonrpc¶
Salt proxy module for OpenWrt devices via ubus JSON-RPC.
Connects to the device’s uhttpd JSON-RPC endpoint and provides OpenWrt configuration management through the ubus API.
# /srv/salt/pillar/router.sls
proxy:
proxytype: uci_ubus_jsonrpc
host: 10.35.24.1
password: secret
# username: salt-agent (default)
# scheme: https (auto-detected by default: tries plain
# port: 443 HTTP on 80 first, falls back to HTTPS on
# 443 — set both explicitly to skip probing,
# e.g. for a device behind Caddy/ACME)
# verify_ssl: false (default)
# timeout: 30 (default, HTTP request timeout)
# session_timeout: 300 (default, rpcd session lifetime)
# rpcd_timeout: 300 (default, rpcd ubus invoke timeout)
- saltext.uci_ubus.proxy.ubus_jsonrpc.init(opts)[source]¶
Create JSON-RPC client from proxy pillar and authenticate.
- saltext.uci_ubus.proxy.ubus_jsonrpc.alive(opts)[source]¶
Return True if the proxy was initialized and no transport error has occurred.
This is a flag-based check (no network I/O). Transport errors in
call()orping()flipinitializedto False so that Salt triggersinit()on the next cycle.