[Nexthop][fboss2-dev] Add config and delete interface ipv6 nd CLI commands#1095
Open
hillol-nexthop wants to merge 1 commit into
Open
[Nexthop][fboss2-dev] Add config and delete interface ipv6 nd CLI commands#1095hillol-nexthop wants to merge 1 commit into
hillol-nexthop wants to merge 1 commit into
Conversation
8 tasks
2cd105f to
c80fd28
Compare
2 tasks
8411704 to
1363722
Compare
hillol-nexthop
added a commit
to nexthop-ai/fboss
that referenced
this pull request
May 13, 2026
Port upstream removal of fboss/cli/fboss2/test/integration_test/ ConfigSessionRestartTest.cpp and its references (cmake and BUCK file lists) from facebook#1095. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
11d7368 to
cc900f1
Compare
Adds `fboss2-dev config interface <name> ipv6 nd <attr> [value]` and the
corresponding `delete` family for resetting attributes. Supported attrs:
ra-interval, ra-lifetime, hop-limit, managed-config-flag,
other-config-flag, ra-address.
Integration tests (fboss/cli/fboss2/test/integration_test/) verify each
attribute landed in the agent's running config via thrift
getRunningConfig(), polled with wait-retry semantics so they tolerate
the agent restart some config changes trigger on commit.
Base-class additions in Fboss2IntegrationTest:
- waitForRunningConfig(predicate, timeout, interval): polls
getRunningConfig(), swallowing thrift exceptions during the
agent-restart window so verification resumes once the agent is back.
- getInterfaceIdForPort(portName): resolves a port name to its L3
interfaceId via getAllInterfaces() thrift. This is the right join
key — show-interface's "vlan" field is portId on port-based
platforms and does not match running-config vlanID/intfID directly.
- commitConfig(): tolerates thrift disconnect on commit (EOF /
Connection refused / Socket not open in stderr). Waits for the
agent to come back and leaves outcome verification to the caller.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0b83abf to
8303e6d
Compare
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 runBased on #1072
Summary
Adds two new fboss2-dev CLI commands for configuring and deleting IPv6 Neighbor Discovery (NDP) settings on interfaces:
config interface <intf> ipv6 nd <attr> [<value>] ...— set NDP attributesdelete interface <intf> ipv6 nd <attr> ...— reset NDP attributes to defaultsSupported attributes:
ra-interval,ra-lifetime,hop-limit,prefix-valid-lifetime,prefix-preferred-lifetime,managed-config-flag,other-config-flag,ra-addressImplementation
CmdConfigInterfaceIpv6andCmdConfigInterfaceIpv6Ndundercommands/config/interface/ipv6/to handle NDP configuration viacfg::Interface::ndp().CmdDeleteInterface,CmdDeleteInterfaceIpv6, andCmdDeleteInterfaceIpv6Ndundercommands/delete/interface/to reset NDP attributes to their defaults.NdpConfigAttrsparses multi-attribute token lists;NdpDeleteAttrsvalidates a list of attribute names to reset.ConfigSessionfor config persistence. No Thrift RPCs are made — NDP is a pure config operation.CmdListConfig.cppand addedOBJECT_ARG_TYPE_ID_NDP_CONFIG_ATTRS/OBJECT_ARG_TYPE_ID_NDP_DELETE_ATTRStoCmdUtilsCommon.h.BUCKandcmake/CliFboss2.cmakebuild files.Test Plan
Unit tests:
test/config/CmdConfigInterfaceIpv6NdTest.cpp,test/config/CmdDeleteInterfaceIpv6NdTest.cppstd::invalid_argumentIntegration tests:
test/integration_test/ConfigInterfaceIpv6NdTest.cpp,test/integration_test/DeleteInterfaceIpv6NdTest.cpp