Skip to content

Commit

Permalink
internal/server: add uplink addresses to ovn state
Browse files Browse the repository at this point in the history
Signed-off-by: Winicius Silva <[email protected]>
  • Loading branch information
winiciusallan committed Dec 14, 2024
1 parent 7123556 commit cf7a3d3
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions internal/server/network/driver_ovn.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,17 @@ func (n *ovn) State() (*api.NetworkState, error) {
mtu = 1500
}

var uplinkIPv4 string
var uplinkIPv6 string

if n.config[ovnVolatileUplinkIPv4] != "" {
uplinkIPv4 = n.config[ovnVolatileUplinkIPv4];
}

if n.config[ovnVolatileUplinkIPv6] != "" {
uplinkIPv6 = n.config[ovnVolatileUplinkIPv6];
}

return &api.NetworkState{
Addresses: addresses,
Counters: api.NetworkStateCounters{},
Expand All @@ -185,6 +196,8 @@ func (n *ovn) State() (*api.NetworkState, error) {
OVN: &api.NetworkStateOVN{
Chassis: chassis,
LogicalRouter: string(n.getRouterName()),
UplinkIPv4: uplinkIPv4,
UplinkIPv6: uplinkIPv6,
},
}, nil
}
Expand Down

0 comments on commit cf7a3d3

Please sign in to comment.