-
Notifications
You must be signed in to change notification settings - Fork 667
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
[minigraph] new workflow for golden path #2396
Merged
Merged
Conversation
This file contains 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
qiluo-msft
approved these changes
Oct 3, 2022
yxieca
pushed a commit
that referenced
this pull request
Oct 5, 2022
#### What I did Change the behavior that load_minigraph will consume golden config by default. New behavior: `config load_minigraph`: No longer consume golden config. `config load_minigraph --golden_config`: Consume default golden config. /etc/sonic/golden_config_db.json `config load_minigraph --golden_config FilePath`: Consume golden config with FilePath #### How I did it Make golden_config click.Option() and add an argument for golden config path. #### How to verify it UT test. #### Previous command output (if the output of a command-line utility has changed) sudo config load_minigraph -h Usage: config load_minigraph [OPTIONS] Reconfigure based on minigraph. Options: -y, --yes -n, --no_service_restart Do not restart docker services -t, --traffic_shift_away Keep device in maintenance with TSA -p, --golden_config_path TEXT specify Golden Config path -?, -h, --help Show this message and exit. #### New command output (if the output of a command-line utility has changed) admin@vlab-01:~$ sudo config load_minigraph --golden_config_path -h Usage: config load_minigraph [OPTIONS] Reconfigure based on minigraph. Options: -y, --yes -n, --no_service_restart Do not restart docker services -t, --traffic_shift_away Keep device in maintenance with TSA -o, --override_config Enable config override. Proceed with default path. -p, --golden_config_path TEXT Provide golden config path to override. Use with --override_config -h, -?, --help Show this message and exit.
EdenGri
pushed a commit
to EdenGri/sonic-utilities
that referenced
this pull request
Oct 12, 2022
#### What I did Change the behavior that load_minigraph will consume golden config by default. New behavior: `config load_minigraph`: No longer consume golden config. `config load_minigraph --golden_config`: Consume default golden config. /etc/sonic/golden_config_db.json `config load_minigraph --golden_config FilePath`: Consume golden config with FilePath #### How I did it Make golden_config click.Option() and add an argument for golden config path. #### How to verify it UT test. #### Previous command output (if the output of a command-line utility has changed) sudo config load_minigraph -h Usage: config load_minigraph [OPTIONS] Reconfigure based on minigraph. Options: -y, --yes -n, --no_service_restart Do not restart docker services -t, --traffic_shift_away Keep device in maintenance with TSA -p, --golden_config_path TEXT specify Golden Config path -?, -h, --help Show this message and exit. #### New command output (if the output of a command-line utility has changed) admin@vlab-01:~$ sudo config load_minigraph --golden_config_path -h Usage: config load_minigraph [OPTIONS] Reconfigure based on minigraph. Options: -y, --yes -n, --no_service_restart Do not restart docker services -t, --traffic_shift_away Keep device in maintenance with TSA -o, --override_config Enable config override. Proceed with default path. -p, --golden_config_path TEXT Provide golden config path to override. Use with --override_config -h, -?, --help Show this message and exit.
mdanish-kh
pushed a commit
to hamnarauf/sonic-utilities
that referenced
this pull request
Oct 22, 2022
#### What I did Change the behavior that load_minigraph will consume golden config by default. New behavior: `config load_minigraph`: No longer consume golden config. `config load_minigraph --golden_config`: Consume default golden config. /etc/sonic/golden_config_db.json `config load_minigraph --golden_config FilePath`: Consume golden config with FilePath #### How I did it Make golden_config click.Option() and add an argument for golden config path. #### How to verify it UT test. #### Previous command output (if the output of a command-line utility has changed) sudo config load_minigraph -h Usage: config load_minigraph [OPTIONS] Reconfigure based on minigraph. Options: -y, --yes -n, --no_service_restart Do not restart docker services -t, --traffic_shift_away Keep device in maintenance with TSA -p, --golden_config_path TEXT specify Golden Config path -?, -h, --help Show this message and exit. #### New command output (if the output of a command-line utility has changed) admin@vlab-01:~$ sudo config load_minigraph --golden_config_path -h Usage: config load_minigraph [OPTIONS] Reconfigure based on minigraph. Options: -y, --yes -n, --no_service_restart Do not restart docker services -t, --traffic_shift_away Keep device in maintenance with TSA -o, --override_config Enable config override. Proceed with default path. -p, --golden_config_path TEXT Provide golden config path to override. Use with --override_config -h, -?, --help Show this message and exit.
preetham-singh
pushed a commit
to preetham-singh/sonic-utilities
that referenced
this pull request
Nov 21, 2022
#### What I did Change the behavior that load_minigraph will consume golden config by default. New behavior: `config load_minigraph`: No longer consume golden config. `config load_minigraph --golden_config`: Consume default golden config. /etc/sonic/golden_config_db.json `config load_minigraph --golden_config FilePath`: Consume golden config with FilePath #### How I did it Make golden_config click.Option() and add an argument for golden config path. #### How to verify it UT test. #### Previous command output (if the output of a command-line utility has changed) sudo config load_minigraph -h Usage: config load_minigraph [OPTIONS] Reconfigure based on minigraph. Options: -y, --yes -n, --no_service_restart Do not restart docker services -t, --traffic_shift_away Keep device in maintenance with TSA -p, --golden_config_path TEXT specify Golden Config path -?, -h, --help Show this message and exit. #### New command output (if the output of a command-line utility has changed) admin@vlab-01:~$ sudo config load_minigraph --golden_config_path -h Usage: config load_minigraph [OPTIONS] Reconfigure based on minigraph. Options: -y, --yes -n, --no_service_restart Do not restart docker services -t, --traffic_shift_away Keep device in maintenance with TSA -o, --override_config Enable config override. Proceed with default path. -p, --golden_config_path TEXT Provide golden config path to override. Use with --override_config -h, -?, --help Show this message and exit.
qiluo-msft
reviewed
Feb 13, 2024
if golden_config_path: | ||
if override_config: | ||
if golden_config_path is None: | ||
golden_config_path = DEFAULT_GOLDEN_CONFIG_DB_FILE | ||
if not os.path.isfile(golden_config_path): | ||
click.secho("Cannot find '{}'!".format(golden_config_path), |
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.
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.
What I did
Change the behavior that load_minigraph will consume golden config by default.
New behavior:
config load_minigraph
: No longer consume golden config.config load_minigraph --golden_config
: Consume default golden config. /etc/sonic/golden_config_db.jsonconfig load_minigraph --golden_config FilePath
: Consume golden config with FilePathHow I did it
Make golden_config click.Option() and add an argument for golden config path.
How to verify it
UT test.
Previous command output (if the output of a command-line utility has changed)
sudo config load_minigraph -h
Usage: config load_minigraph [OPTIONS]
Reconfigure based on minigraph.
Options:
-y, --yes
-n, --no_service_restart Do not restart docker services
-t, --traffic_shift_away Keep device in maintenance with TSA
-p, --golden_config_path TEXT specify Golden Config path
-?, -h, --help Show this message and exit.
New command output (if the output of a command-line utility has changed)
admin@vlab-01:~$ sudo config load_minigraph --golden_config_path -h
Usage: config load_minigraph [OPTIONS]
Reconfigure based on minigraph.
Options:
-y, --yes
-n, --no_service_restart Do not restart docker services
-t, --traffic_shift_away Keep device in maintenance with TSA
-o, --override_config Enable config override. Proceed with default path.
-p, --golden_config_path TEXT Provide golden config path to override. Use with --override_config
-h, -?, --help Show this message and exit.