-
Notifications
You must be signed in to change notification settings - Fork 372
[Nexthop][fboss2-dev] Add a unit tests checking the CLI command tree. #805
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
Open
benoit-nexthop
wants to merge
8
commits into
facebook:main
Choose a base branch
from
nexthop-ai:fboss2-cli-prototype_part13
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[Nexthop][fboss2-dev] Add a unit tests checking the CLI command tree. #805
benoit-nexthop
wants to merge
8
commits into
facebook:main
from
nexthop-ai:fboss2-cli-prototype_part13
Conversation
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
Open
2 tasks
5eec2e0 to
11070e4
Compare
2 tasks
Add some helper code to process interface-list arguments.
11070e4 to
a859613
Compare
1. Some of the configuration commands like QoS buffer pool modification
requires an agent restart and some are hitless. Inorder to take
appropriate action during the commit, track the highest impact action by
storing the same in `$HOME/.fboss2/action_level` at the end of each
configuration change. The proposed change only prints a warning if the
action needs to be taken. Later this can be modified to perform the
action automatically
2. Add QoS buffer pool configuration commands
```
- fboss2 config qos buffer-pool <name> shared-bytes <value>
- fboss2 config qos buffer-pool <name> headroom-bytes <value>
- fboss2 config qos buffer-pool <name> reserved-bytes <value>
```
1. Updated existing UT for action information
2. Added new tests for QoS buffer bool configurations.
```
[admin@fboss101 ~]$ ~/benoit/fboss2-dev config qos buffer-pool testpool headroom-bytes 1024
Successfully set headroom-bytes for buffer-pool 'testpool' to 1024
[admin@fboss101 ~]$ ~/benoit/fboss2-dev config session diff
--- current live config
+++ session config
@@ -121,6 +121,12 @@
"arpAgerInterval": 5,
"arpRefreshSeconds": 20,
"arpTimeoutSeconds": 60,
+ "bufferPoolConfigs": {
+ "testpool": {
+ "headroomBytes": 1024,
+ "sharedBytes": 0
+ }
+ },
"clientIdToAdminDistance": {
"0": 20,
"1": 1,
[admin@fboss101 ~]$ ll ~/.fboss2
total 216
-rw-r--r-- 1 admin admin 213283 Jan 13 05:15 agent.conf
-rw-r--r-- 1 admin admin 42 Jan 13 05:15 conf_metadata.json
[admin@fboss101 ~]$ cat ~/.fboss2/conf_metadata.json
{
"action": {
"WEDGE_AGENT": "AGENT_RESTART"
}
}
```
…mand. This doesn't yet automatically create the VLAN if it doesn't exist.
A recent merge introduced a duplicate command by mistake (bad merge on my part) and this escaped because of lack of test coverage. Also make sure we keep `cmake/CliFboss2Test.cmake` sorted.
a859613 to
379e043
Compare
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
A recent merge introduced a duplicate command by mistake (bad merge on my part) and this escaped because of lack of test coverage.
Also make sure we keep
cmake/CliFboss2Test.cmakesorted.Note: this change is part of a series, the previous one is #791, the next one is #809.
Test Plan
New regression unit test.