Skip to content

Conversation

@teclator
Copy link
Contributor

@teclator teclator commented Apr 10, 2025

Problem

Although there is a bridge model in the backend, there is no way to configure it through the CLI or through the HTTP api.

Solution

Added bridge support similar to what was added for bonding in (#885) and also fix it because looks like we broke the bonding handling when moved to the HTTP Api (#1064).

An example of the json bridge configuration looks like:

{
  "network": {
    "connections": [
      {
        "id": "Bridge0",
        "method4": "manual",
        "interface": "br0",
        "addresses": ["192.168.1.100/24"],
        "gateway4": "192.168.1.1",
        "nameservers": ["192.168.1.1"],
        "bridge": {
          "ports": ["eth0", "eth1"],
          "stp": false
        }
      }
    ]
  }
}

Testing

  • Added a new unit test
  • Tested manually

@teclator teclator force-pushed the bridge_support branch 4 times, most recently from bfe1f8b to b656888 Compare May 14, 2025 13:33
@teclator teclator marked this pull request as ready for review May 14, 2025 15:16
@teclator teclator changed the title (WIP) Adding bridge support for the HTTP API and CLI Add bridge support for the HTTP API and CLI May 14, 2025
@coveralls
Copy link

coveralls commented May 14, 2025

Coverage Status

coverage: 63.008% (+0.2%) from 62.83%
when pulling f1ae5d6 on bridge_support
into c008d8f on master.

@teclator teclator requested a review from imobachgs May 15, 2025 09:13
Copy link
Contributor

@imobachgs imobachgs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The approach looks good (similar to the bonding support), but there is too much cloning.

@teclator teclator requested a review from imobachgs May 19, 2025 08:45
@teclator teclator merged commit 29bbf0f into master May 20, 2025
19 checks passed
@teclator teclator deleted the bridge_support branch May 20, 2025 05:32
@imobachgs imobachgs mentioned this pull request May 26, 2025
imobachgs added a commit that referenced this pull request May 26, 2025
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this pull request May 27, 2025
https://build.opensuse.org/request/show/1280489
by user IGonzalezSosa + anag_factory
- Version 15

- Proper handling of WebSocket secure connections (gh#agama-project/agama#2391):
  - "agama monitor" does not use "insecure" by default.
  - Do not encrypt the connection when using ws: URLs.

- Cache progress reporting to avoid blocking the clients
  (gh#agama-project/agama#2389).

- Update schema of the storage model (gh#agama-project/agama#2346).

- Provide software conflicts HTTP API (gh#agama-project/agama#2348)

- Cache issues to avoid blocking the clients
  (gh#agama-project/agama#2379).

- Cache the software configuration and products in the web server,
  the software backend is blocked during package installation
  (bsc#1241208)

- Add support for bridge connections (gh#agama-project/agama#2258).

- Do not crash when network events do not contain "addresses",
  "nameserver
imobachgs added a commit that referenced this pull request Jun 6, 2025
## Problem

With #2356 I unfortunately missed the changes from #2258 where
`slave-type` was changed to `port-type` which only NM >= 1.46.0
supports.

## Solution

Send `port-type` only for NM >= 1.46.0, otherwise `slave-type` is used.
Also since I was already adding a test for this, I also added two
additional test for `connection_to_dbus` with bridge and bond
connections.

## Testing

- *Added a new unit test*
- *Tested manually*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants