Repository navigation
Enh/fabric - #181
Draft
Giluerre wants to merge 3 commits into
Draft
Enh/fabric#181Giluerre wants to merge 3 commits into
Giluerre wants to merge 3 commits into
Conversation
Giluerre
force-pushed
the
enh/fabric
branch
6 times, most recently
from
September 21, 2026 09:32
e3bf3f5 to
ff4710a
Compare
…briclet implementation This commit introduces a name abstraction layer between SONiC's native interface names (e.g. Ethernet0) and abstract names (e.g. eth0-0), alias management, a full wirelet implementation for network-operator compatibility, FRR BGP config generation, host-service module installation, and TLS support for the agent server. Proto/gRPC: - Added RPCs to SwitchAgentService: Reboot, OnieBootModeInstall, RestartSystemdService, RebootCause, FactoryReset, GetReadiness - Added 5 new provider services: DeviceProviderService, InterfaceProviderService, DHCPRelayProviderService, VLANProviderService, LLDPProviderService - Added WireSonicSwitchService with full SwitchConfig (hostname, loopback IPs, VLANs with DHCP relay and port members, BGP peer groups with VLAN/interface-based neighbors) - Added native_name, alias_name fields to Interface message; new SetInterfaceAliasName and SaveConfig RPCs Agent Server: - TLS support: loads cert/key pair from flags or auto-generates self-signed ECDSA/P256 certificate; --enable-plain-mode flag disables TLS - Registers all new gRPC services at startup - Added provider server files delegating to SwitchAgent interface - Added wire_sonic_switch_server.go implementing WireSonicSwitchService SONiC Agent: - Detects SONiC OS version, sets OSProfile (edgecore or default) - Background goroutine waits for org.SONiC.HostService, runs compatibility check, installs missing host-service modules, triggers Reprovision once ready - SaveConfig refactored to use hostservices handler registry - New methods: Reboot, OnieBootModeInstall, RestartSystemdService, RebootCause, FactoryReset, GetReadiness, GetLastRebootTime, Reprovision, ListInterfacesV2 - EnsureInterface: handles Loopback, Physical, RoutedVLAN types; syncs IPs, admin state, MTU, VLAN memberships via dbAccessor - ApplySwitch: applies full WireSwitchConfig — sets hostname, ensures Loopback0, creates VLANs with interfaces/DHCP relay/port members (MTU 9100, FEC rs, speed 25G), generates frr.conf via FRR template, restarts bgp service, writes cell state to WIRE_CELL_STATE|<device> in STATE_DB - DeleteSwitch: sets state to Reprovisioning, calls Reprovision async, returns in-progress sentinel (code=2) on repeated calls - ListInterfaces reads oper status from APPL_DB instead of STATE_DB - Name conversion utils: NativeNameToAbstractName/AbstractNameToNativeName helpers DB Accessor (db_accessor.go): - New dbAccessor holding CONFIG_DB, STATE_DB, APPL_DB clients - Full CRUD for: port config/state, admin/oper status, MTU/FEC/speed, loopback and VLAN lifecycle, IP address sync, VLAN member sync, DHCP relay, cell provisioning state FRR (frr/frr.go, frr.conf.tmpl): - GenerateFRRConfig renders frr.conf from embedded template using WireBGPConfig - Topology inferred from peer group names: NORTH group → leaf, otherwise spine - VLAN stanzas emitted for every unique non-zero VLAN ID in BGP neighbor list Host Services (hostservices/hostservices.go): - DbusMapping YAML schema with Handler entries; embedded default and edgecore modules - HostServicesCompatibilityCheck: gates on D-Bus availability, introspects each handler - InstallHostServiceModule: copies Python module, patches sonic-host-server imports - SystemDbusClient wrapping godbus/dbus - Embedded Python modules: onie.py (default and edgecore), extension.py, reboot.py CLI: - apply-switch command: reads SwitchConfig JSON (protojson) and calls ApplySwitch RPC - delete-switch command: calls DeleteSwitch; --wait flag polls until state clears - gnoi save-config subcommand Agent Types: - Added: PortDetails, EnsureInterfaceRequest, InterfaceStatus, DHCPRelayRequest, DHCPRelayStatus, VLANRequest, VLANStatus, LLDPRequest, LLDPStatus - Added wire types: WireVLANMember, WireVLAN, WireBGPNeighbor, WireBGPPeerGroup, WireBGPConfig, WireSwitchConfig, ApplySwitchRequest Controller: - EnsureInterface creates SwitchInterface CR with NativeName and owner reference to Switch - SwitchInterface CRD: added nativeName to spec, aliasName to status, Initializing state - Reconciler syncs interface alias name to spec.handle if mismatched Signed-off-by: Daniel Beres <daniel.beres@sap.com>
Giluerre
force-pushed
the
enh/fabric
branch
from
September 21, 2026 09:33
ff4710a to
3568ef8
Compare
Signed-off-by: Daniel Beres <daniel.beres@sap.com>
Signed-off-by: Daniel Beres <daniel.beres@sap.com>
hardikdr
reviewed
Nov 12, 2026
hardikdr
left a comment
Member
There was a problem hiding this comment.
Should we close this one since there is not much activity going on now? @Giluerre @byteocean
This branch has not been deployed
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.
This commit introduces a name abstraction layer between SONiC's native interface
names (e.g. Ethernet0) and abstract names (e.g. eth0-0), alias management, a full
wirelet implementation for network-operator compatibility, FRR BGP config generation,
host-service module installation, and TLS support for the agent server.