Skip to content
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

[CRM][DASH] Extend CRM utility to support DASH resources. #2800

Merged
merged 1 commit into from
May 31, 2023

Conversation

oleksandrivantsiv
Copy link
Collaborator

@oleksandrivantsiv oleksandrivantsiv commented Apr 18, 2023

What I did

Extend CRM utility to support DASH resources.

How I did it

Add "dash" sub-group to "crm config" and "crm show" commands.
"dash" sub-group will be available for the user only if SONiC runs on the DPU.

How to verify it

Compile sonic-utilities package. The tests will run automatically.
To cover dash-related functionality new test tests/crm_dash_test.py was added.
Code coverage is the following:
crm/dash_config.py - 99%
crm/dash_show.py - 98%
crm/main.py - 92%

Previous command output (if the output of a command-line utility has changed)

The existing commands are not affected.

New command output (if the output of a command-line utility has changed)

crm config

  • thresholds dash [vnet|eni|eni-ether-address] type [percentage|used|count]
  • thresholds dash [vnet|eni|eni-ether-address] [low|high]
  • thresholds dash [ipv4|ipv6] [inbound|outbound] routing type [percentage|used|count]
  • thresholds dash [ipv4|ipv6] [inbound|outbound] routing [low|high]
  • thresholds dash [ipv4|ipv6] pa-validation [percentage|used|count]
  • thresholds dash [ipv4|ipv6] pa-validation [low|high]
  • thresholds dash [ipv4|ipv6] outbound ca-to-pa [percentage|used|count]
  • thresholds dash [ipv4|ipv6] outbound ca-to-pa [low|high]
  • thresholds dash [ipv4|ipv6] acl group [percentage|used|count]
  • thresholds dash [ipv4|ipv6] acl group [low|high]
  • thresholds dash [ipv4|ipv6] acl rule [percentage|used|count]
  • thresholds dash [ipv4|ipv6] acl rule [low|high]

crm show

  • [resources|thresholds] dash [vnet|eni|eni-ether-address]
  • [resources|thresholds] dash [ipv4|ipv6] [inbound|outbound] routing
  • [resources|thresholds] dash [ipv4|ipv6] pa-validation
  • [resources|thresholds] dash [ipv4|ipv6] outbound ca-to-pa
  • [resources|thresholds] dash [ipv4|ipv6] acl group
  • [resources|thresholds] dash [ipv4|ipv6] acl rule

show thresholds all

Resource Name                Threshold Type      Low Threshold    High Threshold
---------------------------  ----------------  ---------------  ----------------
dash_vnet                    percentage                     70                85
dash_eni                     percentage                     70                85
dash_eni_ether_address_map   percentage                     70                85
dash_ipv4_inbound_routing    percentage                     70                85
dash_ipv6_inbound_routing    percentage                     70                85
dash_ipv4_outbound_routing   percentage                     70                85
dash_ipv6_outbound_routing   percentage                     70                85
dash_ipv4_pa_validation      percentage                     70                85
dash_ipv6_pa_validation      percentage                     70                85
dash_ipv4_outbound_ca_to_pa  percentage                     70                85
dash_ipv6_outbound_ca_to_pa  percentage                     70                85
dash_ipv4_acl_group          percentage                     70                85
dash_ipv6_acl_group          percentage                     70                85
dash_ipv4_acl_rule           percentage                     70                85
dash_ipv6_acl_rule           percentage                     70                85

show resources all

Resource Name                  Used Count    Available Count
---------------------------  ------------  -----------------
dash_vnet                               2          200000000
dash_eni                                9            1000000
dash_eni_ether_address_map              9            1000000
dash_ipv4_inbound_routing               9          200000000
dash_ipv6_inbound_routing               0          200000000
dash_ipv4_outbound_routing              9            1000000
dash_ipv6_outbound_routing              0            1000000
dash_ipv4_pa_validation                 0            1000000
dash_ipv6_pa_validation                 0            1000000
dash_ipv4_outbound_ca_to_pa             0            1000000
dash_ipv6_outbound_ca_to_pa             0            1000000
dash_ipv4_acl_group                    27          200000000
dash_ipv6_acl_group                     0          200000000

Signed-off-by: Oleksandr Ivantsiv <oivantsiv@nvidia.com>
@oleksandrivantsiv oleksandrivantsiv marked this pull request as draft April 18, 2023 11:29
@oleksandrivantsiv oleksandrivantsiv marked this pull request as ready for review April 25, 2023 14:01
@oleksandrivantsiv oleksandrivantsiv self-assigned this May 26, 2023
@oleksandrivantsiv
Copy link
Collaborator Author

@prsunny kindly reminder to review PR.

@prsunny prsunny added the dash label May 27, 2023
@prsunny
Copy link
Contributor

prsunny commented May 30, 2023

@oleksandrivantsiv , can you please update description with old and new command? Any change to existing command on non-dash platforms by introducing this?

@oleksandrivantsiv
Copy link
Collaborator Author

@oleksandrivantsiv , can you please update description with old and new command? Any change to existing command on non-dash platforms by introducing this?

@prsunny description is updated. The existing commands are not affected.

Copy link
Contributor

@prsunny prsunny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@liat-grozovik liat-grozovik merged commit 6e0ee3e into sonic-net:master May 31, 2023
dprital added a commit to dprital/sonic-buildimage that referenced this pull request Jun 5, 2023
Update sonic-utilities submodule pointer to include the following:
* 5c9b2177 Fix issue: out of range sflow polling interval is accepted and stored in config_db ([sonic-net#2847](sonic-net/sonic-utilities#2847))
* 72ca4848 Add CLI configuration options for teamd retry count feature ([sonic-net#2642](sonic-net/sonic-utilities#2642))
* 359dfc0c [Clock] Implement clock CLI ([sonic-net#2793](sonic-net/sonic-utilities#2793))
* b316fc27 Add transceiver status CLI to show output from TRANSCEIVER_STATUS table ([sonic-net#2772](sonic-net/sonic-utilities#2772))
* dc59dbd2 Replace pickle by json ([sonic-net#2849](sonic-net/sonic-utilities#2849))
* a66f41c4 [show] replace shell=True, replace xml by lxml, replace exit by sys.exit ([sonic-net#2666](sonic-net/sonic-utilities#2666))
* 57500572 [utilities_common] replace shell=True ([sonic-net#2718](sonic-net/sonic-utilities#2718))
* 6e0ee3e7 [CRM][DASH] Extend CRM utility to support DASH resources. ([sonic-net#2800](sonic-net/sonic-utilities#2800))
* b2c29b0b [config] Generate sysinfo in single asic ([sonic-net#2856](sonic-net/sonic-utilities#2856))

Signed-off-by: dprital <drorp@nvidia.com>
StormLiangMS pushed a commit to sonic-net/sonic-buildimage that referenced this pull request Jun 5, 2023
…nic-utilities submodule on master (#15193)

Dependency:
sonic-net/sonic-utilities#2718

Why I did it
This PR sonic-net/sonic-utilities#2718 reduce shell=True usage in utilities_common.cli.run_command() function.

Work item tracking
Microsoft ADO (number only): 15022050
How I did it
Replace strings commands using utilities_common.cli.run_command() function to list of strings

due to circular dependency, advance sonic-utilities submodule
72ca4848 (HEAD -> master, upstream/master, upstream/HEAD) Add CLI configuration options for teamd retry count feature (sonic-net/sonic-utilities#2642)
359dfc0c [Clock] Implement clock CLI (sonic-net/sonic-utilities#2793)
b316fc27 Add transceiver status CLI to show output from TRANSCEIVER_STATUS table (sonic-net/sonic-utilities#2772)
dc59dbd2 Replace pickle by json (sonic-net/sonic-utilities#2849)
a66f41c4 [show] replace shell=True, replace xml by lxml, replace exit by sys.exit (sonic-net/sonic-utilities#2666)
57500572 [utilities_common] replace shell=True (sonic-net/sonic-utilities#2718)
6e0ee3e7 [CRM][DASH] Extend CRM utility to support DASH resources. (sonic-net/sonic-utilities#2800)
b2c29b0b [config] Generate sysinfo in single asic (sonic-net/sonic-utilities#2856)
pdhruv-marvell pushed a commit to pdhruv-marvell/sonic-utilities that referenced this pull request Aug 23, 2023
…2800)

- What I did
Extend CRM utility to support DASH resources.

- How I did it
Add "dash" sub-group to "crm config" and "crm show" commands.
"dash" sub-group will be available for the user only if SONiC runs on the DPU.

- How to verify it
Compile sonic-utilities package. The tests will run automatically.
To cover dash-related functionality new test tests/crm_dash_test.py was added.
Code coverage is the following:
crm/dash_config.py - 99%
crm/dash_show.py - 98%
crm/main.py - 92%

- Previous command output (if the output of a command-line utility has changed)
The existing commands are not affected.

- New command output (if the output of a command-line utility has changed)

crm config

thresholds dash [vnet|eni|eni-ether-address] type [percentage|used|count]
thresholds dash [vnet|eni|eni-ether-address] [low|high]
thresholds dash [ipv4|ipv6] [inbound|outbound] routing type [percentage|used|count]
thresholds dash [ipv4|ipv6] [inbound|outbound] routing [low|high]
thresholds dash [ipv4|ipv6] pa-validation [percentage|used|count]
thresholds dash [ipv4|ipv6] pa-validation [low|high]
thresholds dash [ipv4|ipv6] outbound ca-to-pa [percentage|used|count]
thresholds dash [ipv4|ipv6] outbound ca-to-pa [low|high]
thresholds dash [ipv4|ipv6] acl group [percentage|used|count]
thresholds dash [ipv4|ipv6] acl group [low|high]
thresholds dash [ipv4|ipv6] acl rule [percentage|used|count]
thresholds dash [ipv4|ipv6] acl rule [low|high]

crm show

[resources|thresholds] dash [vnet|eni|eni-ether-address]
[resources|thresholds] dash [ipv4|ipv6] [inbound|outbound] routing
[resources|thresholds] dash [ipv4|ipv6] pa-validation
[resources|thresholds] dash [ipv4|ipv6] outbound ca-to-pa
[resources|thresholds] dash [ipv4|ipv6] acl group
[resources|thresholds] dash [ipv4|ipv6] acl rule

show thresholds all

show resources all

Signed-off-by: Oleksandr Ivantsiv <oivantsiv@nvidia.com>
sonic-otn pushed a commit to sonic-otn/sonic-buildimage that referenced this pull request Sep 20, 2023
…nic-utilities submodule on master (sonic-net#15193)

Dependency:
sonic-net/sonic-utilities#2718

Why I did it
This PR sonic-net/sonic-utilities#2718 reduce shell=True usage in utilities_common.cli.run_command() function.

Work item tracking
Microsoft ADO (number only): 15022050
How I did it
Replace strings commands using utilities_common.cli.run_command() function to list of strings

due to circular dependency, advance sonic-utilities submodule
72ca4848 (HEAD -> master, upstream/master, upstream/HEAD) Add CLI configuration options for teamd retry count feature (sonic-net/sonic-utilities#2642)
359dfc0c [Clock] Implement clock CLI (sonic-net/sonic-utilities#2793)
b316fc27 Add transceiver status CLI to show output from TRANSCEIVER_STATUS table (sonic-net/sonic-utilities#2772)
dc59dbd2 Replace pickle by json (sonic-net/sonic-utilities#2849)
a66f41c4 [show] replace shell=True, replace xml by lxml, replace exit by sys.exit (sonic-net/sonic-utilities#2666)
57500572 [utilities_common] replace shell=True (sonic-net/sonic-utilities#2718)
6e0ee3e7 [CRM][DASH] Extend CRM utility to support DASH resources. (sonic-net/sonic-utilities#2800)
b2c29b0b [config] Generate sysinfo in single asic (sonic-net/sonic-utilities#2856)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants