push_config_start
Starts a JUNOS configuration push as a background job, returning the diff and job ID without waiting for commit; use it when device commits are slow or tool calls time out.
Instructions
Start push_config as a background job and return its diff and job_id without waiting for the commit.
Use this instead of push_config when the client cuts a tool call at about
60 s (hosted connectors) or the device commits slowly (SRX branch models such
as SRX300/320/340/345), or when push_config answered "Still running". The
job uses the host's full RPC timeout (timeout in config.ini, else 180 s on
SRX branch models and 120 s otherwise) and no per-call deadline. Arguments
and the commit flow are the same as push_config.
The job locks the candidate configuration, loads the change and computes the
diff, and this call returns that diff (diff). The same locked session then
goes on to commit_check -> commit confirmed -> health check -> confirm ->
unlock, so the committed change is exactly the diff returned. Poll
push_config_result(job_id) every ~10 s until status is not
running. If the server dies mid-way, an unconfirmed commit confirmed
rolls back on the device after confirm_timeout minutes.
With dry_run=True (default) nothing is committed: the answer has
status dry_run and the diff under result once the job finishes.
Returns {"job_id", "status", "hostname", "diff"?, "result"?, "poll_with": "push_config_result", "poll_after_seconds"}. status may
already be final (done with "No changes to apply", failed for a lock
or load error). A refusal returns {"status": "rejected", "error"} (a push
to this host is already in progress, too many retained jobs, or a config
switch while a job runs).
Args: hostname: Target device hostname (must exist in config.ini) config_file: Path to .set or .j2 file (mutually exclusive with set_commands) set_commands: List of set commands (mutually exclusive with config_file) dry_run: If True (default), return the diff only; nothing is committed confirm_timeout: Minutes before auto-rollback (default 1) no_commit: Commit confirmed only, then let JUNOS roll back (see push_config) health_check: Health check commands after commit (see push_config; default ["uptime"]) config_path: Path to config.ini (empty string uses default search)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | ||
| hostname | Yes | ||
| no_commit | No | ||
| config_file | No | ||
| config_path | No | ||
| health_check | No | ||
| set_commands | No | ||
| confirm_timeout | No |