Skip to content

Add NETCONF Support to IOS‑XR Terraform Provider#322

Open
hayibrah wants to merge 2 commits intoCiscoDevNet:mainfrom
hayibrah:feature-netconf-pro-support
Open

Add NETCONF Support to IOS‑XR Terraform Provider#322
hayibrah wants to merge 2 commits intoCiscoDevNet:mainfrom
hayibrah:feature-netconf-pro-support

Conversation

@hayibrah
Copy link

@hayibrah hayibrah commented Mar 12, 2026

Overview

This PR introduces full NETCONF protocol support as an alternative to gNMI, enabling configuration management of IOS‑XR devices using NETCONF with improved reliability, flexibility, and performance.


Key Features

NETCONF Support

  • NETCONF 1.0/1.1 via go-netconf
  • Candidate + running datastore workflows
  • Automatic capability detection
  • Subtree filter generation for IOS‑XR

Connection Management

  • Optional connection reuse (default: enabled)
  • Smart locking: concurrent reads, serialized writes
  • Health checks, retries, reconnection logic
  • Capability caching

NETCONF Operations

  • Enhanced EditConfig with ignore‑missing and “no changes” handling
  • GetConfig with timeout + retry
  • Candidate and running datastore commit flows

Error Handling & Logging

  • Detailed NETCONF error extraction
  • Graceful handling of common conditions
  • Structured + debug XML logging

Benefits

  • Faster operations via connection reuse
  • More resilient sessions with retries + health checks
  • Works with both candidate and non‑candidate devices
  • Backward‑compatible with existing gNMI workflows

Example Usage

provider "iosxr" {
  host             = "10.1.1.1:830"
  username         = "cisco"
  password         = "cisco123"
  protocol         = "netconf"
  reuse_connection = true
}

resource "iosxr_hostname" "example" {
  hostname = "router-1"
}

@hayibrah hayibrah changed the title Netconf support Add NETCONF Support to IOS‑XR Terraform Provider Mar 12, 2026
@hayibrah hayibrah force-pushed the feature-netconf-pro-support branch from 44bd22e to 0d0c981 Compare March 12, 2026 09:16
@hayibrah hayibrah force-pushed the feature-netconf-pro-support branch from d85e985 to 0781280 Compare March 12, 2026 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant