[Nexthop][NPI] "asic_config_v3" - support generating a single platform#1346
Open
marif-nexthop wants to merge 1 commit into
Open
[Nexthop][NPI] "asic_config_v3" - support generating a single platform#1346marif-nexthop wants to merge 1 commit into
marif-nexthop wants to merge 1 commit into
Conversation
Add an optional `--platform <name>` flag to the `asic_config_v3` generator so a single platform's variants can be regenerated on their own. With no flag, behavior is unchanged: all discovered platforms are generated. The executable entry point (`MAIN_MODULE`) is switched from `gen:generate_all_asic_configs` to a new `gen:main` that parses the flag. Single-platform mode only clears that platform's own outputs (`<platform>_*`), leaving other platforms' generated YAML untouched.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pre-submission checklist
pip install -r requirements-dev.txt && pre-commit installpre-commit runSummary
Implements
asic_config_v3design.Add an optional
--platform <name>flag to theasic_config_v3generator so a single platform's variants can be regenerated on their own. With no flag, behavior is unchanged: all discovered platforms are generated.The executable entry point (
MAIN_MODULEincmake/AsicConfigV3ConfigCli.cmake) is switched fromgen:generate_all_asic_configsto a newgen:mainthat parses the flag. Single-platform mode only clears that platform's own outputs (<platform>_*), leaving other platforms' generated YAML untouched.Test Plan
Built and ran
fboss/lib/asic_config_v3/run-helper.shin the build container:--platform montblanc: regenerates onlymontblanc_*.yml; other platforms' outputs are left untouched and byte-identical.--platform bogus: exits non-zero with aValueErrorlisting the available platforms.