Conversation
majst01
approved these changes
Sep 3, 2026
6 tasks
1 task
Contributor
|
It would be great if the description of this PR could include some more detail about the specific reasons for this change (how this gets configured, for what purposes and scenarios this is useful, what it will look like for operators). It would help me a lot to think about the implications of it, I think, and also provide some documentation for possible later reference. 😅 |
iljarotar
marked this pull request as draft
September 9, 2026 08:30
iljarotar
marked this pull request as ready for review
September 9, 2026 09:39
SwitchPortMembership to nicsPort endpoint of SwitchService
iljarotar
marked this pull request as draft
September 11, 2026 13:40
Port endpoint of SwitchServicePort endpoint of SwitchService
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.
Description
With #174 and several consecutive PRs we introduced endpoints which allow connecting external hosts to our networks. External means that the hosts are not known to the api, i.e. they are not registered machines.
However, after discussing the api design with @majst01 and @Gerrit91 we realized there's a much simpler way to accomplish this. As there already exists the
Portendpoint in the admin SwitchService that allows setting the admin status of a port, we can simply extend this endpoint to allow passing more config options for the port. For now, I'm adding the port membership and an optional network. Later we can add more parameters to configure on the port.The objective behind network memberships is that there are use-cases where we need to connect hosts that aren't known to the api to our networks. Making a port an external member of a network will add the port to the network's vrf and setup a bgp session. The implementation must validate that only ports that are not connected to a registered machine can be added as external members.