Skip to content

Configuration

All NetOps configuration lives under .olav/workspace/ops/config/. This page is the reference for every config file.

Feature Claims

ID Claim Status
C-NE-12 nornir/hosts.yaml defines the device inventory for collection πŸ”Ά Env-Blocked
C-NE-13 blacklisted_commands.yaml supports regex patterns; invalid patterns are skipped with a warning ⬜ Pending
C-NE-14 cron_schedules.yaml customizes the trace_learner cron schedule πŸ”Ά Env-Blocked

Directory Layout

.olav/workspace/ops/config/
β”œβ”€β”€ nornir/
β”‚   β”œβ”€β”€ hosts.yaml              # Device inventory (hostnames, IPs, platforms)
β”‚   β”œβ”€β”€ groups.yaml             # Shared settings per group (credentials, timeouts)
β”‚   β”œβ”€β”€ defaults.yaml           # Global defaults
β”‚   └── config.yaml             # Nornir runner settings (parallelism, etc.)
β”œβ”€β”€ default_commands.yaml       # Generic commands executed on all platforms
β”œβ”€β”€ discovery_commands.yaml     # Critical commands for topology discovery
β”œβ”€β”€ blacklisted_commands.yaml   # Regex patterns for forbidden commands
β”œβ”€β”€ backup_only_commands.yaml   # Commands for config backup (not parsed)
β”œβ”€β”€ cron_schedules.yaml         # Scheduled job timing
└── netops_settings.yaml        # General NetOps runtime settings

Nornir Inventory

hosts.yaml

One entry per device. The hostname field is the SSH target (IP or resolvable name).

R1:
  hostname: 10.0.1.1
  platform: cisco_ios
  groups:
    - core_routers

SW1:
  hostname: 10.0.2.1
  platform: cisco_ios
  groups:
    - access_switches

Supported platform values follow the NTC-Templates naming convention: cisco_ios, cisco_nxos, arista_eos, juniper_junos, etc.

groups.yaml

Credentials and connection settings shared across devices in the same group.

core_routers:
  username: admin
  password: "${NORNIR_PASSWORD}"
  connection_options:
    netmiko:
      extras:
        timeout: 30
        secret: "${ENABLE_SECRET}"

Environment variables

Use ${VAR_NAME} syntax for sensitive values. OLAV expands these at runtime.


Command Lists

default_commands.yaml

Generic commands run on every device during collection. These are the fallback if no platform-specific command list exists.

- show version
- show running-config
- show interfaces
- show ip interface brief
- show clock

discovery_commands.yaml

Commands required for topology generation. If these fail to parse, /netops_init reports them as P0 gaps.

- show cdp neighbors
- show cdp neighbors detail
- show lldp neighbors
- show lldp neighbors detail
- show ip ospf neighbor
- show ip bgp summary

blacklisted_commands.yaml

Regex patterns (case-insensitive) that block command execution. Even whitelisted commands are rejected if they match a blacklist pattern.

- "reload"
- "write erase"
- "conf(igure)? t(erminal)?"
- "delete"

Invalid regex patterns are silently skipped with a warning log.

backup_only_commands.yaml

Commands whose output is stored in raw_output_store but not parsed by TextFSM. Typically used for running-config backup.

- show running-config
- show startup-config

Scheduling

cron_schedules.yaml

Customize the daily collection schedule. Default: 0 3 * * * (03:00 daily).

trace_learner:
  cron: "0 3 * * *"

The schedule is registered during /netops_init Stage 5. Re-running /netops_init updates the cron entry (idempotent β€” no duplicates).