Skip to content

[Nexthop][fboss2-dev] Add delete interface description and mtu - #1495

Open
vybhav-nexthop wants to merge 1 commit into
facebook:mainfrom
nexthop-ai:delete-interface-description-mtu
Open

[Nexthop][fboss2-dev] Add delete interface description and mtu#1495
vybhav-nexthop wants to merge 1 commit into
facebook:mainfrom
nexthop-ai:delete-interface-description-mtu

Conversation

@vybhav-nexthop

@vybhav-nexthop vybhav-nexthop commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Pre-submission checklist

  • I've ran the linters locally and fixed lint errors related to the files I modified in this PR. You can install the linters by running pip install -r requirements-dev.txt && pre-commit install
  • pre-commit run

Summary

Adds the missing delete interface counterparts for attributes that config interface can already set:

  • delete interface <port-list> description — clears optional sw.ports[*].description
  • delete interface <port-list> mtu — clears optional sw.interfaces[*].mtu (agent falls back to Interface::kDefaultMtu)

Both are valueless resets on the existing flat delete interface <ports> <attr>… form, saved HITLESS to match the config-side setters.

queue-config is intentionally not part of this PR: delete interface <port-list> queue-config already clears portQueueConfigName upstream.

Test plan

  • Unit tests in CmdDeleteInterfaceTest (description, mtu, combined, idempotent)
  • Integration test DeleteInterfaceTest.DeleteDescriptionAndMtu (set both → delete both; TearDown restores prior description/mtu)

Fill in the `delete interface` gaps where `config interface` can set an
attribute but nothing could unset it.

  delete interface <port-list> description
      Valueless reset of the optional sw.ports[*].description.

  delete interface <port-list> mtu
      Valueless reset of the optional sw.interfaces[*].mtu. The agent falls
      back to Interface::kDefaultMtu when unset, so this is an
      interface-level reset rather than a port-level one.

Both save with ConfigActionLevel::HITLESS, matching the config-side
setters; SaiSwitch has no prohibited-change guard for these fields.

`queue-config` is deliberately not included here: `delete interface
<port-list> queue-config` already clears portQueueConfigName upstream.
@vybhav-nexthop
vybhav-nexthop requested a review from a team as a code owner August 10, 2026 10:13
@meta-cla meta-cla Bot added the CLA Signed label Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant