Skip to content

feat(iosxr): Implement VRF provider#344

Open
sven-rosenzweig wants to merge 2 commits into
mainfrom
vrf
Open

feat(iosxr): Implement VRF provider#344
sven-rosenzweig wants to merge 2 commits into
mainfrom
vrf

Conversation

@sven-rosenzweig
Copy link
Copy Markdown
Contributor

Adds basic VRF configuration support for IOS-XR routers.

Follow-ups:

  • Set interfaces as member of the VRF
  • Add support for 2-byte and IPv4 route targets

@github-actions github-actions Bot added the size/L label May 7, 2026
@hardikdr hardikdr added the area/switch-automation Automation processes for network switch management and operations. label May 8, 2026
@hardikdr hardikdr added this to Roadmap May 8, 2026
@sven-rosenzweig sven-rosenzweig force-pushed the vrf branch 2 times, most recently from 852053e to d04980e Compare May 13, 2026 12:11
@sven-rosenzweig sven-rosenzweig marked this pull request as ready for review May 13, 2026 12:12
@sven-rosenzweig sven-rosenzweig requested a review from a team as a code owner May 13, 2026 12:12
Comment on lines +66 to +67
}
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: you pipe this one through jq once for formatting?

Copy link
Copy Markdown
Contributor Author

@sven-rosenzweig sven-rosenzweig May 13, 2026

Choose a reason for hiding this comment

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

updated.

Comment on lines +389 to +392
if p.client == nil {
return errors.New("client is not connected")
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You typically wouldn't check this for nil.

case v1alpha1.IPv6:
AppendAddressFamily(&vrf.AddrFamily.IPv6.Unicast, rt, routeTarget.Action)
default:
return fmt.Errorf("unsupported address family %q for VRF %q", af, req.VRF.Spec.Name)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If you want, you can make use of the apistatus package in #325 (just needs a review).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Reviewed the PR, will make the change for IOS-XR at once. So leave this here as is.

Adds basic VRF configuration support for IOS-XR routers.

Follow-ups:
* Set interfaces as member of the VRF
* Add support for 2-byte and IPv4 route targets

Signed-off-by: Sven Rosenzweig <sven.rosenzweig@sap.com>
Signed-off-by: Sven Rosenzweig <sven.rosenzweig@sap.com>
@github-actions
Copy link
Copy Markdown

Merging this branch will decrease overall coverage

Impacted Packages Coverage Δ 🤖
github.com/ironcore-dev/network-operator/internal/provider/cisco/iosxr 39.92% (-0.25%) 👎

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/ironcore-dev/network-operator/internal/provider/cisco/iosxr/provider.go 27.33% (-2.54%) 161 (+7) 44 (-2) 117 (+9) 👎
github.com/ironcore-dev/network-operator/internal/provider/cisco/iosxr/vrf.go 64.71% (+64.71%) 17 (+17) 11 (+11) 6 (+6) 🌟

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/ironcore-dev/network-operator/internal/provider/cisco/iosxr/vrf_test.go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/switch-automation Automation processes for network switch management and operations. size/L

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants