Skip to content

API Reference

Complete API reference for the netops-toolkit Python library.


Modules

Section Description
Core Connection management, device inventory, credential vault
Check Health checks, BGP monitoring, interface status, VLAN audit, vendor-specific checks
Change Semantic diff, change planning, safe push, automated rollback
Collect Configuration collection and bulk backup with diff tracking
Parsers Vendor-specific CLI and eAPI output parsers
Playbooks Ansible remediation playbook generation
Report HTML/PDF report generation, health dashboard, email delivery, scheduling
Ansible Dynamic inventory script and Ansible modules
Inventory Subnet scanner and device discovery

Quick Reference

netops.core

Module Key Classes / Functions
netops.core.connection Transport, AuthMethod, ConnectionParams, DeviceConnection
netops.core.inventory Device, Inventory
netops.core.vault CredentialVault, main()

netops.check

Module Key Functions
netops.check.health run_health_check(), build_health_report()
netops.check.bgp check_bgp_peers(), build_bgp_report()
netops.check.interfaces check_interfaces()
netops.check.vlan audit_vlans(), build_vlan_report()
netops.check.arista run_health_check(), build_eos_health_report()
netops.check.cisco run_cisco_health_check(), build_cisco_health_report()
netops.check.juniper run_health_check(), build_junos_health_report()
netops.check.paloalto run_health_check(), run_policy_audit()

netops.change

Module Key Classes / Functions
netops.change.diff ConfigStyle, DiffResult, diff_configs(), format_semantic()
netops.change.plan ChangePlan, ChangeStep, generate_plan(), apply_plan()
netops.change.push ChangeRecord, run_push(), load_changelog()
netops.change.rollback RollbackRecord, run_rollback_push(), load_audit_log()

netops.collect

Module Key Functions
netops.collect.config collect_config()
netops.collect.backup run_backup(), generate_diff(), git_commit()

netops.parsers

Module Vendor / Format
netops.parsers.arista Arista EOS eAPI JSON + CLI text
netops.parsers.bgp Cisco IOS/XE/XR BGP CLI
netops.parsers.brocade Brocade FastIron / FOS CLI
netops.parsers.cisco Cisco IOS/IOS-XE CLI
netops.parsers.health CPU/memory/errors/logs (multi-vendor)
netops.parsers.juniper Juniper JunOS CLI
netops.parsers.nokia_sros Nokia SR-OS CLI
netops.parsers.paloalto Palo Alto PAN-OS CLI
netops.parsers.vlan Cisco VLAN CLI

netops.playbooks

Module Key Classes / Functions
netops.playbooks.generator FailureType, GeneratedPlaybook, generate_playbook(), generate_playbooks_from_report()
netops.playbooks.templates.remediation RemediationTemplate, REMEDIATION_TEMPLATES, get_template()

netops.report

Module Key Classes / Functions
netops.report.generator ReportGenerator, generate_report()
netops.report.health_dashboard aggregate_dashboard(), format_table(), render_html()
netops.report.mailer ReportMailer
netops.report.scheduler ReportScheduler, ScheduledReport

netops.ansible

Module Key Functions
netops.ansible.dynamic_inventory build_inventory(), get_host_vars()
netops.ansible.modules.netops_command run_module()
netops.ansible.modules.netops_facts run_module()

netops.inventory

Module Key Classes / Functions
netops.inventory.scan ScanResult, scan_subnet(), ping_sweep(), deep_enrich(), merge_inventory()

See Also

  • User Guides — step-by-step guides for common workflows
  • Examples — runnable example scripts