Studio Project workflows for Juniper JUNOS software upgrade, port turn-up, and configuration push
Juniper JUNOS is the network operating system running Juniper's routers, switches, and security devices — a single FreeBSD-based codebase with a hierarchical, transactional configuration model exposed over NETCONF.
This project provides a NETCONF-based device driver, a Studio Project covering software upgrade, port turn-up, golden configuration compliance, and inventory management, plus golden configuration trees and a configuration parser for JUNOS set-format lines — see Device Drivers, Projects, and Golden Configurations below.
Requirements: Itential Platform >= 6.4 · Itential Gateway >= 5.4
| Asset | Description |
|---|---|
| device-drivers/netconf-python | IG5 Python NETCONF driver — is-alive, run-command, get-config, send-command, reboot |
| Studio Projects/Juniper JUNOS | IG5 project — software upgrade, port turn-up, push configuration, command runner |
| Configuration Parsers/juniper-junos-set.json | Config Manager parser defining the juniper-junos-set device type |
| Golden Configurations/Juniper JUNOS set | Golden config tree using JUNOS set-format lines — requires juniper-junos-set parser |
| Golden Configurations/Juniper JUNOS text - Jinja2 | Golden config tree using text-format lines with Jinja2 templates for flexible value matching |
| Golden Configurations/Juniper JUNOS text - Simple | Golden config tree using text-format lines with literal matching |
Itential Platform ships with netmiko and scrapli drivers for Juniper JUNOS out of the box.
This repo provides a NETCONF alternative — use it when you need operations that survive
a mid-response session restart (software upgrades, reboots) or when you want to retrieve
configuration in a specific format (xml, text, set, json).
Wire the four broker contracts to their junos-netconf-* services when creating or
updating an inventory. Replace your-cluster-id with the clusterId of your IG5 instance.
{
"actions": [
{
"name": "is-alive",
"action_type": "iag5-service",
"action_config": {
"serviceName": "junos-netconf-is-alive",
"clusterId": "your-cluster-id"
},
"action_parameters": {}
},
{
"name": "run-command",
"action_type": "iag5-service",
"action_config": {
"serviceName": "junos-netconf-run-command",
"clusterId": "your-cluster-id"
},
"action_parameters": {}
},
{
"name": "get-config",
"action_type": "iag5-service",
"action_config": {
"serviceName": "junos-netconf-get-config",
"clusterId": "your-cluster-id"
},
"action_parameters": {}
},
{
"name": "set-config",
"action_type": "iag5-service",
"action_config": {
"serviceName": "junos-netconf-set-config",
"clusterId": "your-cluster-id"
},
"action_parameters": {}
}
]
} The name field is the broker contract the platform calls. The serviceName is the IG5
service that handles it. They do not need to match — the mapping is the bridge.
Devices use NETCONF over SSH (port 830). Set these attributes on each node in Inventory Manager:
{
"name": "my-junos-device",
"attributes": {
"itential_host": "192.0.2.1",
"itential_user": "netconf-user",
"itential_password": "changeme",
"itential_driver_options": {
"netconf": {
"port": 830,
"timeout": 30,
"command_timeout": 300,
"config_format": "set",
"lock_timeout": 60,
"lock_poll_interval": 2
}
}
}
} | Attribute | Type | Unit | Description |
|---|---|---|---|
port | integer | — | NETCONF SSH port on the device (default: 830) |
timeout | integer | seconds | Connection handshake timeout for all operations except run-command |
command_timeout | integer | seconds | RPC wait timeout for run-command only — set high (300–600 s) for long-running commands like request system software add |
config_format | string | — | Output format for get-config: xml (default, NETCONF RPC), text (curly-brace), set (set-format lines), or json |
lock_timeout | integer | seconds | Max time to wait for the candidate datastore lock before send-command or send-config fails (0 = fail immediately) |
lock_poll_interval | integer | seconds | Polling interval between lock-acquire retries |
Required on the device before use:
set system services netconf ssh commitTCP/830 must be reachable from the IG5 host.
A native Python NETCONF driver for IG5. Use this for any JUNOS operation that would drop a CLI/SSH session mid-response — software installs and reboots in particular.
See device-drivers/netconf-python/README.md for full documentation including all operations, locking behavior, and local testing.
Quick start — register services in IG5:
iagctl db import device-drivers/netconf-python/import.yaml --force Or copy the services and decorators blocks from
import.yaml into your own import.yml.
Registered services:
Four services implement the IG5 device broker input/output contracts and are called directly by the device broker (is-alive checks, Config Manager remediation, etc.):
| Service | Broker contract | Notes |
|---|---|---|
junos-netconf-is-alive | is-alive | Returns bare true or false — no JSON wrapper |
junos-netconf-run-command | run-command | Returns plain text command output |
junos-netconf-get-config | get-config | Returns plain text configuration |
junos-netconf-set-config | set-config | Accepts Config Manager changes array; returns results array |
Three additional services are workflow-only tasks — the broker never calls them directly. Use them in workflow tasks to give operators structured, typed inputs:
| Service | Operation |
|---|---|
junos-netconf-send-command | Apply an array of set-style config lines and commit |
junos-netconf-send-config | Apply a multi-line config block string and commit |
junos-netconf-reboot | Schedule reboot via <request-reboot/> |
Dependencies: ncclient>=0.6.13, lxml>=4.9.0
An IG5 project for Juniper JUNOS device automation via NETCONF, organized into three folders.
Software Upgrade
Before importing: The Upgrade Form contains example image paths (
/var/tmp/junos-install-vsrx3-x86-64-22.4R2.8.tgz) and SHA-256 hashes for specific vSRX packages. Update the form'senumfields under "Image Path on Device" and "Expected Image SHA-256" to match the software images staged in your environment.
Golden Configuration
Inventory Management
Port Turn Up
send-config, and verifies with a post-checkshow configuration interfaces, show security zones, and show route table inet.0 before and after the changeset-format lines for the interface unit, VLAN ID, IP address, and security zone assignmentBefore running: Ensure the target interface supports VLAN tagging and the security zone already exists on the device. The form's
zonefield must match an existing zone name exactly.
Dependencies: junos-netconf-* services registered in IG5 (see Device Drivers above)
Defines the juniper-junos-set device type in Config Manager. This parser must be
imported before the Juniper JUNOS set golden configuration tree can be created or
used. It tokenizes JUNOS set-format lines using the cisco-ios lexer template, treating
each line as a sequence of words delimited by whitespace, with # comments and
quoted strings handled correctly.
Import via Config Manager → Configuration Parsers → Import.
Three golden configuration trees are provided. All ship with no device bindings — bind each tree to your devices in Config Manager after importing.
Device type: juniper-junos-set · Config format: set
Baseline configuration using JUNOS set-format lines. Suited for environments where
configuration is managed and retrieved in set format. Supports Config Manager remediation
via the junos-netconf-set-config service.
Before importing: The
juniper-junos-setparser must be registered in Config Manager first (see Configuration Parsers above). Then update"devices"in the root node to match your Inventory Manager group name and device name.
Dependencies: juniper-junos-set parser · Config Manager enabled · junos-netconf-set-config registered in IG5
Device type: juniper-junos · Config format: text
Baseline configuration using text-format (curly-brace) lines with Jinja2 template
expressions for flexible value matching. Use this when your environment has multiple
allowed values for a field — for example, permitting two software versions during a
phased upgrade rollout.
Device type: juniper-junos · Config format: text
Baseline configuration using text-format (curly-brace) lines with literal matching.
Use this as a starting point when all devices in a group are expected to share identical
configuration values with no variation.