# dineshbaburam91/ansible-junos-stdlib architecture

> Architecture diagram of the GitHub repository dineshbaburam91/ansible-junos-stdlib, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dineshbaburam91/ansible-junos-stdlib
- Repository: https://github.com/dineshbaburam91/ansible-junos-stdlib

## Overview

This is the Juniper Ansible collection for managing Junos OS and Junos Evolved devices. The principal workflow is an Ansible user invoking a collection module to perform a device task and receive its result: configuration changes, operational actions, or retrieved data. The collection also provides connection/protocol plugins and JSNAPy test reporting. The graph preserves the documented capability areas; source excerpts chiefly establish the resource-facts/configuration layer, so other implementation links are omitted rather than inferred.

Main entry points: [`ansible_collections/juniper/device/plugins/module_utils/network/junos/facts/facts.py`](https://github.com/dineshbaburam91/ansible-junos-stdlib/blob/master/ansible_collections/juniper/device/plugins/module_utils/network/junos/facts/facts.py) (Fact parsing), [`ansible_collections/juniper/device/plugins/module_utils/network/junos/config/static_routes/static_routes.py`](https://github.com/dineshbaburam91/ansible-junos-stdlib/blob/master/ansible_collections/juniper/device/plugins/module_utils/network/junos/config/static_routes/static_routes.py) (Config rendering), [`ansible_collections/juniper/device/plugins/modules/jsnapy.py`](https://github.com/dineshbaburam91/ansible-junos-stdlib/blob/master/ansible_collections/juniper/device/plugins/modules/jsnapy.py) (JSNAPy tests), [`ansible_collections/juniper/device/plugins/module_utils/network/junos/argspec/static_routes/static_routes.py`](https://github.com/dineshbaburam91/ansible-junos-stdlib/blob/master/ansible_collections/juniper/device/plugins/module_utils/network/junos/argspec/static_routes/static_routes.py) (Resource arguments)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_modules["Ansible modules"]
  node_config_ops["Config management<br/>[config.py]"]
  node_commands["Commands and RPCs<br/>[command.py]"]
  node_facts["Facts retrieval<br/>[facts.py]"]
  node_file_transfer["File transfer<br/>[file_copy.py]"]
  node_software["Software install<br/>[software.py]"]
  node_system["System operations<br/>[system.py]"]
  node_network_resources["Network resources"]
  node_connectivity["Connectivity tests<br/>[ping.py]"]
  node_path_mtu["Path MTU discovery<br/>[pmtud.py]"]
  node_snap_tests["JSNAPy tests<br/>[jsnapy.py]"]
end

subgraph group_resources["Resource layer"]
  node_config_resource["Config rendering<br/>[static_routes.py]"]
  node_facts_resource["Fact parsing<br/>[facts.py]"]
  node_resource_args["Resource arguments<br/>[static_routes.py]"]
  node_routing_instances["Routing instances"]
  node_routing_options["Routing options<br/>[routing_options.py]"]
end

subgraph group_transport["Device access"]
  node_connection["PyEZ connection<br/>[pyez.py]"]
  node_netconf["NETCONF plugin<br/>[junos.py]"]
  node_cliconf["CLI configuration<br/>[junos.py]"]
end

subgraph group_plugins["Reporting plugins"]
  node_callback["JSNAPy callback<br/>[jsnapy.py]"]
end

node_user(("Ansible user"))
node_junos{{"Junos device"}}

node_user -->|"invokes"| node_config_ops
node_user -->|"invokes"| node_commands
node_user -->|"invokes"| node_facts
node_user -->|"invokes"| node_file_transfer
node_user -->|"invokes"| node_software
node_user -->|"invokes"| node_system
node_user -->|"invokes"| node_network_resources
node_user -->|"invokes"| node_connectivity
node_user -->|"invokes"| node_path_mtu
node_user -->|"invokes"| node_snap_tests
node_config_resource -->|"gets facts"| node_facts_resource
node_config_resource -.->|"applies configuration"| node_junos
node_resource_args -.->|"defines inputs"| node_config_resource
node_routing_instances -.->|"gets facts"| node_facts_resource
node_routing_options -.->|"gets facts"| node_facts_resource
node_facts_resource -.->|"collects device data"| node_junos
node_connection -.->|"connects"| node_junos
node_netconf -.->|"uses NETCONF"| node_junos
node_cliconf -.->|"uses CLI"| node_junos
node_snap_tests -->|"reports failures"| node_callback

click node_config_ops "https://github.com/dineshbaburam91/ansible-junos-stdlib/blob/master/ansible_collections/juniper/device/plugins/modules/config.py"
click node_commands "https://github.com/dineshbaburam91/ansible-junos-stdlib/blob/master/ansible_collections/juniper/device/plugins/modules/command.py"
click node_facts "https://github.com/dineshbaburam91/ansible-junos-stdlib/blob/master/ansible_collections/juniper/device/plugins/modules/facts.py"
click node_file_transfer "https://github.com/dineshbaburam91/ansible-junos-stdlib/blob/master/ansible_collections/juniper/device/plugins/modules/file_copy.py"
click node_software "https://github.com/dineshbaburam91/ansible-junos-stdlib/blob/master/ansible_collections/juniper/device/plugins/action/software.py"
click node_system "https://github.com/dineshbaburam91/ansible-junos-stdlib/blob/master/ansible_collections/juniper/device/plugins/action/system.py"
click node_network_resources "https://github.com/dineshbaburam91/ansible-junos-stdlib/blob/master/ansible_collections/juniper/device/plugins/modules/junos_static_routes.py"
click node_connectivity "https://github.com/dineshbaburam91/ansible-junos-stdlib/blob/master/ansible_collections/juniper/device/plugins/modules/ping.py"
click node_path_mtu "https://github.com/dineshbaburam91/ansible-junos-stdlib/blob/master/ansible_collections/juniper/device/plugins/action/pmtud.py"
click node_snap_tests "https://github.com/dineshbaburam91/ansible-junos-stdlib/blob/master/ansible_collections/juniper/device/plugins/modules/jsnapy.py"
click node_config_resource "https://github.com/dineshbaburam91/ansible-junos-stdlib/blob/master/ansible_collections/juniper/device/plugins/module_utils/network/junos/config/static_routes/static_routes.py"
click node_facts_resource "https://github.com/dineshbaburam91/ansible-junos-stdlib/blob/master/ansible_collections/juniper/device/plugins/module_utils/network/junos/facts/facts.py"
click node_resource_args "https://github.com/dineshbaburam91/ansible-junos-stdlib/blob/master/ansible_collections/juniper/device/plugins/module_utils/network/junos/argspec/static_routes/static_routes.py"
click node_routing_instances "https://github.com/dineshbaburam91/ansible-junos-stdlib/blob/master/ansible_collections/juniper/device/plugins/module_utils/network/junos/config/routing_instances/routing_instances.py"
click node_routing_options "https://github.com/dineshbaburam91/ansible-junos-stdlib/blob/master/ansible_collections/juniper/device/plugins/module_utils/network/junos/config/routing_options/routing_options.py"
click node_connection "https://github.com/dineshbaburam91/ansible-junos-stdlib/blob/master/ansible_collections/juniper/device/plugins/connection/pyez.py"
click node_netconf "https://github.com/dineshbaburam91/ansible-junos-stdlib/blob/master/ansible_collections/juniper/device/plugins/netconf/junos.py"
click node_cliconf "https://github.com/dineshbaburam91/ansible-junos-stdlib/blob/master/ansible_collections/juniper/device/plugins/cliconf/junos.py"
click node_callback "https://github.com/dineshbaburam91/ansible-junos-stdlib/blob/master/ansible_collections/juniper/device/plugins/callback/jsnapy.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_config_ops,node_commands,node_facts,node_file_transfer,node_software,node_system,node_network_resources,node_connectivity,node_path_mtu,node_snap_tests,node_user toneBlue
class node_config_resource,node_facts_resource,node_resource_args,node_routing_instances,node_routing_options toneAmber
class node_connection,node_netconf,node_cliconf toneMint
class node_callback toneRose
class node_junos toneIndigo
```

## Components

### Ansible modules

- [Config management](https://github.com/dineshbaburam91/ansible-junos-stdlib/blob/master/ansible_collections/juniper/device/plugins/modules/config.py): `ansible_collections/juniper/device/plugins/modules/config.py`
- [Commands and RPCs](https://github.com/dineshbaburam91/ansible-junos-stdlib/blob/master/ansible_collections/juniper/device/plugins/modules/command.py): `ansible_collections/juniper/device/plugins/modules/command.py`
- [Facts retrieval](https://github.com/dineshbaburam91/ansible-junos-stdlib/blob/master/ansible_collections/juniper/device/plugins/modules/facts.py): `ansible_collections/juniper/device/plugins/modules/facts.py`
- [File transfer](https://github.com/dineshbaburam91/ansible-junos-stdlib/blob/master/ansible_collections/juniper/device/plugins/modules/file_copy.py): `ansible_collections/juniper/device/plugins/modules/file_copy.py`
- [Software install](https://github.com/dineshbaburam91/ansible-junos-stdlib/blob/master/ansible_collections/juniper/device/plugins/action/software.py): `ansible_collections/juniper/device/plugins/action/software.py`
- [System operations](https://github.com/dineshbaburam91/ansible-junos-stdlib/blob/master/ansible_collections/juniper/device/plugins/action/system.py): `ansible_collections/juniper/device/plugins/action/system.py`
- [Network resources](https://github.com/dineshbaburam91/ansible-junos-stdlib/blob/master/ansible_collections/juniper/device/plugins/modules/junos_static_routes.py): `ansible_collections/juniper/device/plugins/modules/junos_static_routes.py`
- [Connectivity tests](https://github.com/dineshbaburam91/ansible-junos-stdlib/blob/master/ansible_collections/juniper/device/plugins/modules/ping.py): `ansible_collections/juniper/device/plugins/modules/ping.py`
- [Path MTU discovery](https://github.com/dineshbaburam91/ansible-junos-stdlib/blob/master/ansible_collections/juniper/device/plugins/action/pmtud.py): `ansible_collections/juniper/device/plugins/action/pmtud.py`
- [JSNAPy tests](https://github.com/dineshbaburam91/ansible-junos-stdlib/blob/master/ansible_collections/juniper/device/plugins/modules/jsnapy.py): `ansible_collections/juniper/device/plugins/modules/jsnapy.py`

### Resource layer

- [Config rendering](https://github.com/dineshbaburam91/ansible-junos-stdlib/blob/master/ansible_collections/juniper/device/plugins/module_utils/network/junos/config/static_routes/static_routes.py): `ansible_collections/juniper/device/plugins/module_utils/network/junos/config/static_routes/static_routes.py`
- [Fact parsing](https://github.com/dineshbaburam91/ansible-junos-stdlib/blob/master/ansible_collections/juniper/device/plugins/module_utils/network/junos/facts/facts.py): `ansible_collections/juniper/device/plugins/module_utils/network/junos/facts/facts.py`
- [Resource arguments](https://github.com/dineshbaburam91/ansible-junos-stdlib/blob/master/ansible_collections/juniper/device/plugins/module_utils/network/junos/argspec/static_routes/static_routes.py): `ansible_collections/juniper/device/plugins/module_utils/network/junos/argspec/static_routes/static_routes.py`
- [Routing instances](https://github.com/dineshbaburam91/ansible-junos-stdlib/blob/master/ansible_collections/juniper/device/plugins/module_utils/network/junos/config/routing_instances/routing_instances.py): `ansible_collections/juniper/device/plugins/module_utils/network/junos/config/routing_instances/routing_instances.py`
- [Routing options](https://github.com/dineshbaburam91/ansible-junos-stdlib/blob/master/ansible_collections/juniper/device/plugins/module_utils/network/junos/config/routing_options/routing_options.py): `ansible_collections/juniper/device/plugins/module_utils/network/junos/config/routing_options/routing_options.py`

### Device access

- [PyEZ connection](https://github.com/dineshbaburam91/ansible-junos-stdlib/blob/master/ansible_collections/juniper/device/plugins/connection/pyez.py): `ansible_collections/juniper/device/plugins/connection/pyez.py`
- [NETCONF plugin](https://github.com/dineshbaburam91/ansible-junos-stdlib/blob/master/ansible_collections/juniper/device/plugins/netconf/junos.py): `ansible_collections/juniper/device/plugins/netconf/junos.py`
- [CLI configuration](https://github.com/dineshbaburam91/ansible-junos-stdlib/blob/master/ansible_collections/juniper/device/plugins/cliconf/junos.py): `ansible_collections/juniper/device/plugins/cliconf/junos.py`

### Reporting plugins

- [JSNAPy callback](https://github.com/dineshbaburam91/ansible-junos-stdlib/blob/master/ansible_collections/juniper/device/plugins/callback/jsnapy.py): `ansible_collections/juniper/device/plugins/callback/jsnapy.py`

### Other components

- **Ansible user**
- **Junos device**

## Connections

- Ansible user → Config management: invokes
- Ansible user → Commands and RPCs: invokes
- Ansible user → Facts retrieval: invokes
- Ansible user → File transfer: invokes
- Ansible user → Software install: invokes
- Ansible user → System operations: invokes
- Ansible user → Network resources: invokes
- Ansible user → Connectivity tests: invokes
- Ansible user → Path MTU discovery: invokes
- Ansible user → JSNAPy tests: invokes
- Config rendering → Fact parsing: gets facts (evidence: `ansible_collections/juniper/device/plugins/module_utils/network/junos/config/static_routes/static_routes.py`)
- Config rendering → Junos device: applies configuration
- Resource arguments → Config rendering: defines inputs
- Routing instances → Fact parsing: gets facts (evidence: `ansible_collections/juniper/device/plugins/module_utils/network/junos/config/routing_instances/routing_instances.py`)
- Routing options → Fact parsing: gets facts (evidence: `ansible_collections/juniper/device/plugins/module_utils/network/junos/config/routing_options/routing_options.py`)
- Fact parsing → Junos device: collects device data
- PyEZ connection → Junos device: connects
- NETCONF plugin → Junos device: uses NETCONF
- CLI configuration → Junos device: uses CLI
- JSNAPy tests → JSNAPy callback: reports failures
