Enhance the ztp plugin and add a new ONIE boot plugin - #470
Conversation
Signed-off-by: Tao Li <tao.li06@sap.com>
Signed-off-by: Tao Li <tao.li06@sap.com>
079703c to
c74058c
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (11)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughAdds a DHCPv6 ONIE plugin with YAML configuration and tests. Extends ZTP configuration with a global provisioning script address, per-switch override resolution, URL validation, updated examples, and tests. ChangesONIE plugin
ZTP provisioning defaults
Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: 🟠 High · up to The PR adds a shared provisioning URL that can be used by multiple switches, while HTTP is allowed and script authenticity is not enforced by this change. A compromised or misconfigured endpoint could affect several devices, so merge should wait for an explicit security decision or stronger transport and content-integrity protections. Sequence Diagram(s)sequenceDiagram
participant DHCPv6Client
participant ONIEPlugin
participant RelayMessage
DHCPv6Client->>ONIEPlugin: Send relayed ONIE discovery request
ONIEPlugin->>RelayMessage: Decapsulate relay message
ONIEPlugin->>ONIEPlugin: Check BootFileURL and ONIE UserClass
ONIEPlugin-->>DHCPv6Client: Return configured BootFileURL
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Description checkExplanation The description clearly explains the ZTP global URL and override behavior, the ONIE plugin behavior, and test coverage. It does not use the template headings or provide a linked issue, but the required change information is present. Full details: Docstring CoverageExplanation Docstring coverage is 12.50% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 16 functions across 9 files. (2 skipped: 2 unsupported.)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This PR provides enhancement on the ztp plugin and the new ONIE plugin.
OptionBootfileURLoption and a specialUserClassoption for determining if it is an onie dhcp6 request. Thus, no conflict with other plugins.Local tests are included. Also deployed and tested in fra3.
Summary by CodeRabbit
New Features
Configuration
Bug Fixes