-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
srv6: better json format for seg6_segs #15905
base: master
Are you sure you want to change the base?
srv6: better json format for seg6_segs #15905
Conversation
Previous Json output contained lists of srv6 segments in the "segs" field. Now we do the "json struct in the json struct", i.e. "seg6->segs" Before... When we had 1 segment : "seg6local":{ "action":"unspec" }, "seg6":{ "segs":"2001:db8:1:1:1::2" } When we had multiple segments : "seg6local":{ "action":"unspec" }, "seg6":[ "2001:db8:aaaa::7", "2002::2", "2003::3", "2004::4" ] Now... When we have multiple segments: seg6":{"segs":["fc00:0:3::","fc00:0:5::","fc00:0:6::"]}}]} Signed-off-by: Dmytro Shytyi <[email protected]>
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.
Isn't this a breaking change?
ci:rerun |
Hi @ton31337 , This changes only json for seg6 segs. No cli configuration impact. Is it considered as breaking change? As iproute has:
In future new parameters might be added, like described above. This change will prepare for future extensions. |
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.
looks good
I meant that JSON breaking change. If it had a structure the people used for automation, and now it's different, then it's not good. |
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.
Is there an exisitng IETF yang model that we should be taking direction from? Also is the structure changing based on there being 1 vs N? This seems wrong, or are we switching to only use an array (which seems good)?
Hello, Thank you for your review. I'm not aware of IETF RFC standardized YANG model for this behavior. Let me give one more example. "seg6local":{ After "seg6local":{ Does this explain what this PR is intented to do better? |
The array is moved into a segs json entry. |
Is this data represented in https://datatracker.ietf.org/doc/html/draft-ietf-spring-srv6-yang-03 ? That's still a draft but it would be good to know we compared what we are doing to what is on the path to being standardized. Thanks, |
Given the structure is completely changing are you also getting rid of the union of singleton vs array of SIDs? Are theese really "seg6"s or are they "SID"s? |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Previous Json output contained lists of srv6 segments in the "segs" field. Now we do the "json struct in the json struct", i.e. "seg6->segs"
Before...
When we had 1 segment :
When we had multiple segments :
Now...
When we have multiple segments: