Skip to content

Conversation

@nemith
Copy link
Owner

@nemith nemith commented Jan 8, 2026

Add support for with-defaults which extends , , and with a optional <with-defaults> element.

@nemith nemith force-pushed the brb/push-tzuqvlsxovmt branch from b44a815 to 80fb188 Compare January 8, 2026 17:46
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements support for RFC6243 with-defaults capability in NETCONF operations. The implementation adds an optional <with-defaults> element to <get>, <get-config>, and <copy-config> operations, allowing clients to control how default values are reported by the server.

  • Defines WithDefaultsMode type with four RFC6243-compliant mode constants
  • Extends Get, GetConfig, and CopyConfig structs with optional WithDefaults field
  • Updates XML marshaling to conditionally include the <with-defaults> element with proper namespace

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
rpc/with_defaults.go Defines WithDefaultsMode type, RFC6243 mode constants, and helper struct for XML marshaling
rpc/with_defaults_test.go Comprehensive tests for XML marshaling of with-defaults in all three supported operations
rpc/rpc.go Adds WithDefaults field to Get struct and updates MarshalXML to include with-defaults element
rpc/config.go Adds WithDefaults field to GetConfig and CopyConfig structs with corresponding MarshalXML updates
README.md Updates RFC6243 status from "planned" to "supported" in the features table
TODO.md Marks with-defaults as completed in the RFC support checklist

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nemith nemith merged commit 2b055d8 into main Jan 8, 2026
6 checks passed
@nemith nemith deleted the brb/push-tzuqvlsxovmt branch January 8, 2026 18:47
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.

2 participants