Skip to content

Use SetBuilder for batched gNMI operations in NX-OS provider - #463

Open
felix-kaestner wants to merge 1 commit into
gnmiext/split-methodfrom
gnmiext/use-setbuilder
Open

Use SetBuilder for batched gNMI operations in NX-OS provider#463
felix-kaestner wants to merge 1 commit into
gnmiext/split-methodfrom
gnmiext/use-setbuilder

Conversation

@felix-kaestner

@felix-kaestner felix-kaestner commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Replace the per-method Update/Patch/Delete slice accumulation with
SetBuilder throughout the NX-OS provider. Each Ensure* and Delete*
method now builds a single SetBuilder and calls p.Do, which handles
the NX-OS feature-ordering constraint transparently via Split.

This reduces gNMI Set round-trips for mixed-operation methods
(EnsureInterface, EnsurePIM, EnsureBorderGatewaySettings, etc.)
from 2-3 RPCs to 1 (or 2 on NX-OS <= 10.6(2) with features).

Add maxSetOperations constant (20) as the default batch limit.

Remove the now-unused p.Update, p.Patch, and
separateFeatureActivation helpers.

Replace the per-method Update/Patch/Delete slice accumulation with
SetBuilder throughout the NX-OS provider. Each Ensure* and Delete*
method now builds a single SetBuilder and calls p.Do, which handles
the NX-OS feature-ordering constraint transparently via Split.

This reduces gNMI Set round-trips for mixed-operation methods
(EnsureInterface, EnsurePIM, EnsureBorderGatewaySettings, etc.)
from 2-3 RPCs to 1 (or 2 on NX-OS <= 10.6(2) with features).

Add maxSetOperations constant (20) as the default batch limit.

Remove the now-unused p.Update, p.Patch, and
separateFeatureActivation helpers.

Signed-off-by: Felix Kästner <[email protected]>
@felix-kaestner
felix-kaestner force-pushed the gnmiext/use-setbuilder branch from e274257 to 8056777 Compare July 27, 2026 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant