Skip to content

Add more config options to Port endpoint of SwitchService - #188

Draft
iljarotar wants to merge 11 commits into
mainfrom
explicit-external-member-field
Draft

iljarotar wants to merge 11 commits into
mainfrom
explicit-external-member-field

Conversation

@iljarotar

@iljarotar iljarotar commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

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 Port endpoint 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.

@iljarotar
iljarotar requested a review from a team as a code owner September 3, 2026 09:22
@metal-robot metal-robot Bot added this to Development Sep 3, 2026
@Gerrit91

Gerrit91 commented Sep 9, 2026

Copy link
Copy Markdown
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
iljarotar marked this pull request as draft September 9, 2026 08:30
@iljarotar
iljarotar marked this pull request as ready for review September 9, 2026 09:39
@iljarotar iljarotar changed the title Add SwitchPortMembership to nics Add more config to Port endpoint of SwitchService Sep 11, 2026
@iljarotar
iljarotar marked this pull request as draft September 11, 2026 13:40
@iljarotar iljarotar changed the title Add more config to Port endpoint of SwitchService Add more config options to Port endpoint of SwitchService Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

4 participants