-
Notifications
You must be signed in to change notification settings - Fork 81
Update lighty-bgp example postman collection #2455
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
base: main
Are you sure you want to change the base?
Conversation
PeterSuna
commented
Nov 13, 2025
- Fix the "router-id" to localhost, based on the request URL where lighty is running.
- Remove unnecessary GET request body.
- Fix "Connect peer" to POST type.
- Fix the "router-id" to localhost, based on the request URL where lighty is running. - Remove unnecessary GET request body. - Fix "Connect peer" to POST type. Signed-off-by: Peter Suna <[email protected]>
Summary of ChangesHello @PeterSuna, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refines the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
The pull request updates the Lighty-BGP example Postman collection. Key changes include fixing the router-id to localhost, removing unnecessary GET request bodies, and correcting the 'Connect peer' request to use the POST method. While these changes align with the stated goals, the removal of the lighty-host variable and subsequent hardcoding of 127.0.0.1:8888 throughout the collection reduces its flexibility and reusability for different environments. Additionally, the removal of extensive <afi-safis> configurations in some requests simplifies the examples but might limit their comprehensiveness.
| "raw": "" | ||
| }, | ||
| "url": { | ||
| "raw": "{{lighty-host}}/restconf/data/network-topology:network-topology/topology=bgp-example-ipv4-topology", |
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 would stay with parameter {lighty-host} - because my lighty is not running on localhost when I invoke the requests :)
| "body": { | ||
| "mode": "raw", | ||
| "raw": "<topology xmlns=\"urn:TBD:params:xml:ns:yang:network-topology\">\n <topology-id>bgp-example-ipv4-topology</topology-id>\n <topology-types>\n <bgp-ipv4-reachability-topology xmlns=\"urn:opendaylight:params:xml:ns:yang:odl-bgp-topology-types\"></bgp-ipv4-reachability-topology>\n </topology-types>\n <rib-id xmlns=\"urn:opendaylight:params:xml:ns:yang:odl-bgp-topology-config\">bgp-example</rib-id>\n</topology>" | ||
| "raw": "<topology xmlns=\"urn:TBD:params:xml:ns:yang:network-topology\">\n <topology-id>bgp-topology-example</topology-id>\n <topology-types>\n <bgp-ipv4-reachability-topology xmlns=\"urn:opendaylight:params:xml:ns:yang:odl-bgp-topology-types\"></bgp-ipv4-reachability-topology>\n </topology-types>\n <rib-id xmlns=\"urn:opendaylight:params:xml:ns:yang:odl-bgp-topology-config\">bgp-example</rib-id>\n</topology>" |
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.
Why do we change topology id/name?
| "body": { | ||
| "mode": "raw", | ||
| "raw": "<protocol xmlns=\"http://openconfig.net/yang/network-instance\">\n <name>bgp-example</name>\n <identifier xmlns:x=\"http://openconfig.net/yang/policy-types\">x:BGP</identifier>\n <bgp xmlns=\"urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions\">\n <global>\n <config>\n <router-id>10.0.0.51</router-id>\n <as>64496</as>\n </config>\n <apply-policy>\n <config>\n <default-export-policy>REJECT-ROUTE</default-export-policy>\n <default-import-policy>REJECT-ROUTE</default-import-policy>\n <import-policy>default-odl-import-policy</import-policy>\n <export-policy>default-odl-export-policy</export-policy>\n </config>\n </apply-policy>\n <afi-safis>\n <afi-safi>\n <afi-safi-name xmlns:x=\"http://openconfig.net/yang/bgp-types\">x:IPV4-UNICAST</afi-safi-name>\n </afi-safi>\n <afi-safi>\n <afi-safi-name xmlns:x=\"http://openconfig.net/yang/bgp-types\">x:IPV6-UNICAST</afi-safi-name>\n </afi-safi>\n <afi-safi>\n <afi-safi-name xmlns:x=\"http://openconfig.net/yang/bgp-types\">x:IPV4-LABELLED-UNICAST</afi-safi-name>\n </afi-safi>\n <afi-safi>\n <afi-safi-name xmlns:x=\"http://openconfig.net/yang/bgp-types\">x:IPV6-LABELLED-UNICAST</afi-safi-name>\n </afi-safi>\n <afi-safi>\n <afi-safi-name xmlns:x=\"http://openconfig.net/yang/bgp-types\">x:L3VPN-IPV4-UNICAST</afi-safi-name>\n </afi-safi>\n <afi-safi>\n <afi-safi-name xmlns:x=\"http://openconfig.net/yang/bgp-types\">x:L3VPN-IPV6-UNICAST</afi-safi-name>\n </afi-safi>\n <afi-safi>\n <afi-safi-name xmlns:x=\"http://openconfig.net/yang/bgp-types\">x:L3VPN-IPV4-MULTICAST</afi-safi-name>\n </afi-safi>\n <afi-safi>\n <afi-safi-name xmlns:x=\"http://openconfig.net/yang/bgp-types\">x:L3VPN-IPV6-MULTICAST</afi-safi-name>\n </afi-safi>\n <afi-safi>\n <afi-safi-name xmlns:x=\"http://openconfig.net/yang/bgp-types\">x:L2VPN-EVPN</afi-safi-name>\n </afi-safi>\n <afi-safi>\n <afi-safi-name>LINKSTATE</afi-safi-name>\n </afi-safi>\n <afi-safi>\n <afi-safi-name>IPV4-FLOW</afi-safi-name>\n </afi-safi>\n <afi-safi>\n <afi-safi-name>IPV6-FLOW</afi-safi-name>\n </afi-safi>\n <afi-safi>\n <afi-safi-name>IPV4-L3VPN-FLOW</afi-safi-name>\n </afi-safi>\n <afi-safi>\n <afi-safi-name>IPV6-L3VPN-FLOW</afi-safi-name>\n </afi-safi>\n <afi-safi>\n <afi-safi-name>IPV4-MCAST-VPN</afi-safi-name>\n </afi-safi>\n <afi-safi>\n <afi-safi-name>IPV6-MCAST-VPN</afi-safi-name>\n </afi-safi>\n <afi-safi>\n <afi-safi-name>ROUTE-TARGET-CONSTRAIN</afi-safi-name>\n </afi-safi>\n </afi-safis>\n </global>\n </bgp>\n</protocol>", | ||
| "raw": "<protocol xmlns=\"http://openconfig.net/yang/network-instance\">\n <name>bgp-example</name>\n <identifier xmlns:x=\"http://openconfig.net/yang/policy-types\">x:BGP</identifier>\n <bgp xmlns=\"urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions\">\n <global>\n <config>\n <router-id>127.0.0.1</router-id>\n <as>64496</as>\n </config>\n <apply-policy>\n <config>\n <default-export-policy>REJECT-ROUTE</default-export-policy>\n <default-import-policy>REJECT-ROUTE</default-import-policy>\n <import-policy>default-odl-import-policy</import-policy>\n <export-policy>default-odl-export-policy</export-policy>\n </config>\n </apply-policy>\n </global>\n </bgp>\n</protocol>", |
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.
Suddenly we have lost an half of body - can you provide the reason for it?
| "response": [] | ||
| }, | ||
| { | ||
| "name": "Connect MULTIPLE peer", |
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.
Document that we have a new request in collection - commit message or new commit.