Closed
Conversation
|
This pull request introduces 1 alert when merging 99565ed into c0df635 - view on LGTM.com new alerts:
|
Contributor
Author
|
retest this please |
jleveque
suggested changes
Nov 17, 2020
scripts/sonic_sku_create.py
Outdated
| @@ -0,0 +1,776 @@ | |||
| #!/usr/bin/env python3 | |||
Contributor
There was a problem hiding this comment.
This script should be Python 2 compatible and the shebang should read #!/usr/bin/env python2 for 201911 branch.
Contributor
Author
There was a problem hiding this comment.
addressed in next commit.
|
This pull request introduces 1 alert when merging a4fc991 into c0df635 - view on LGTM.com new alerts:
|
Contributor
|
It appears you copied over the code from the master branch after I converted it to Python 3, which explains the shebang and the LGTM alerts. This code needs to be Python 2-compatible in the 201911 branch. |
Contributor
Author
|
Closing this PR because I have created a similar PR with cherry pick from Master branch. |
stepanblyschak
pushed a commit
to stepanblyschak/sonic-utilities
that referenced
this pull request
Apr 28, 2022
Revert "Refine getDbId() calling to fix build after swss-common change (sonic-net#1245)" This shoudl fix VS build. Signed-off-by: Abhishek Dosi <[email protected]>
stepanblyschak
pushed a commit
to stepanblyschak/sonic-utilities
that referenced
this pull request
Apr 28, 2022
[sonic-swsss] Fix the issue of field "next_hop_ip" not getting updated in state DB in ERSPAN Mirror (sonic-net#1375) [vlanmgr] Support Jumbo Frame By Default (sonic-net#1393) [fec] added logic that put port down before applying fec onfiguration (sonic-net#1399) [fec] Get FEC mode when port is already admin down (sonic-net#1403) Refine getDbId() calling to fix build after swss-common change (sonic-net#1245)
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.
- What I did
I added a new script file sonic_sku_create.py to generate a new HWSKU based on XML file or Minigraph. But, focus is on creating HWSKU based on XML file and not on the minigraph and l2 mode. I also added a unit test pyTest script sku_create_test.py in sonic-utilities-test folder to test the script in Unit Testing mode.
Motivation: To create SKU for Mellanox platforms based on XML file with Port related inputs and also through Minigraph file.
This tool also allows to split a port or unsplit ports based on configuration which modifies the port related information in port_config.ini and config_db.json
usage: sonic_sku_create.py [-h] [-v]
(-f FILE | -m [MINIGRAPH_FILE] | -j JSON_FILE | -pp PORT_SPLIT PORT_SPLIT)
[-b BASE] [-r] [-k HWSKU] [-p] [-vv]
Create a new SKU
optional arguments:
-h, --help show this help message and exit
-v, --version show program's version number and exit
-f FILE, --file FILE SKU definition from xml file. -f OR -m or -j must be provided when creating a new SKU
-m [MINIGRAPH_FILE], --minigraph_file [MINIGRAPH_FILE]
SKU definition from minigraph file. -f OR -m or -j must be provided when creating a new SKU
-j JSON_FILE, --json_file JSON_FILE
SKU definition from config_db.json file. -f OR -m OR -j must be provided when creating a new SKU
-pp PORT_SPLIT PORT_SPLIT, --port_split PORT_SPLIT PORT_SPLIT
port name and split
-b BASE, --base BASE SKU base definition
-r, --remove Remove SKU folder
-k HWSKU, --hwsku HWSKU
SKU name to be used when creating a new SKU or for L2 configuration mode
-p, --print Print port_config.ini without creating a new SKU
-vv, --verbose Verbose output
Output:
Creation of Port_config.ini file.
Modifying Port_config.ini and config_db.json based on port split and unsplit configuration.
- How I did it
I did it by adding these files which are required for new SKU generation in the forthcoming releases.
- How to verify it
I verified all the options of sonic_sku_create.py file and tested them thoroughly as well as created a test case in sku_create_test.py file to test the functionality of sonic_sku_create.py in Unit Test mode.
- Previous command output (if the output of a command-line utility has changed)
None
- New command output (if the output of a command-line utility has changed)