-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for importing routes in vendor-specific format #323
base: master
Are you sure you want to change the base?
Conversation
x-field-uid: 1 | ||
x-enum: | ||
v4_routes: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have any use cases for these (v4_routes & v6_routes) options? If not, can it be added later, once required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The use case is driven by development cycle.
- One should be able to load routes in OTG format if implementation of other formats are not available
- Test ports do not have the capability to understand vendor specific formats, only Controller does, hence controller to test port communication would require sending imported routes in OTG format
the format for which could be different across vendors, and convert | ||
those to OTG V4 or V6 routes configured across corresponding BGP peers. | ||
Following additional details need to be considered: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor nit, will need to update this description once different formats/conversions have known implementations instead of listing requirements.
artifacts/otg.proto
Outdated
// Description missing in models | ||
repeated BgpV6RouteRange v6_routes = 3; | ||
|
||
// Binary containing routes in OpenConfig format |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i am not clear why we are trying import these a byte blobs as part of OTG?
Shouldn't we have defined an OTG specific modelling for the route and then have a tool which can convert the vendor specific formats to the OTG native format
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have data model for representing routes to be imported in OTG:
- https://github.com/open-traffic-generator/models/blob/load-routes/artifacts/otg.proto#L2552
- https://github.com/open-traffic-generator/models/blob/load-routes/artifacts/otg.proto#L7201
And we indeed can just have a Go test where the community maintained Go library is used to convert vendor-specific exports to OTG routes as modeled above. But the challenges would be:
- We'll have to maintain the same library for different languages (e.g. python) for tests that can't use Go
- Users will manually have to do some transformations for some route parameters (e.g. next hop address)
Hence a more language agnostic way to achieve this would be to just feed the blob to ixia-c-controller and let it do the intended transcoding and transformation (while still using the community maintained Go library for transcoding).
Changes proposed below can be visualized in the data model tree.
Requirement
Currently V4 and V6 routes to be advertised or withdrawn needs to be manually configured as part of BGP peer configuration on OTG ports.
To replicate real world scenarios, one should be able to export routes installed on a DUT, the format for which could be different across vendors, and automatically convert those to OTG routes so that those can be advertised or withdrawn as is or with modifications from OTG ports.
Further associated expectations are as noted below:
Bgp.V4RouteRange
orBgp.V6RouteRange
in OTG, with exactly 1 entry ofV4RouteAddress
orV6RouteAddress
respectively.Proposal
1. Converting exported routes to OTG routes
It naturally makes sense to create a community maintained repository which would host the source for transcoding exported routes to OTG
V4RouteAddress
andV6RouteAddress
, since it'll require contribution from corresponding vendors for transcoding their respective formats, as they're more likely to have expertise in understanding all corner cases of the format.Preferably the source should be maintained in Go, as it's compiled and should easily be able to produce a binary that can be plugged in to any OTG implementation, and would still be comparatively easy to maintain because of its minimalism in terms of language features. Alternatively, it can be used as a library for OTG implementations written in Go.
Hence, this does not really require changes in data model, but the parameters that drive this plugin / library shall be part of data model and discussed in later sections.
2. When to perform conversion ?
The usual test workflow today looks like this:
A new API will be exposed which accepts blob containing exported routes as an input, with some associated parameters and convert those to OTG routes, adding them to corresponding peers of existing OTG configuration. Proposed workflow when importing routes would look like so:
Summary of each step:
There might be cases where it's desirable to not manually configure destination IP addresses in IP header, as those might belong to a large pool, as part of exported routes. In such cases there are two possible approaches:
3. Introduction of Route Groups
The proposed workflow for route import poses following challenges:
Bgp.V4RouteRange
orBgp.V6RouteRange
, referring to them in bulk in scaled use cases will affect UXTo address these, new sibling properties in BGP peer configuration is introduced - array of
Bgp.V4RouteGroup
and array ofBgp.V6RouteGroup
, where each item shall be uniquely identifiable with a name and enclose a list of name ofBgp.V4RouteRange
andBgp.V6RouteRange
respectively, with a constraint that they have exactly oneV4RouteAddress
andV6RouteAddress
configured, respectively.Another constraint to be taken into account is that same route group name can not be used across different BGP peers.
Examples