-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fetch DHCP leases from nmcli
over dbus
#418
Comments
Chatgpt produced:
or
tested first code snippet on bluefield2
second code snippet is |
this is
|
@bhoopesh369 do you want to take a stab with this issue ? |
Yep |
assigned to @bhoopesh369 |
nmcli
nmcli
o er dbus
nmcli
o er dbus
nmcli
over dbus
i think going with github.com/Wifx/gonetworkmanager wont be future proof |
agree |
let's discuss also how we wat to expose this to user... we will have 3 options:
agree or you have different algorithm ? |
See xPU sZTP provisioning block
today we pass lease file via cmdline arguments like this:
--dhcp-lease-file /var/lib/dhclient/dhclient.leases
.but can we detect that info automatically from Network Manager over dbus ?
spec https://networkmanager.dev/
for example I found:
or using dbus directly:
Working example in python:
Now need to find
go
bindings for it...Maybe https://github.com/Wifx/gonetworkmanager ?
like https://pkg.go.dev/github.com/Wifx/gonetworkmanager#DHCP4Config
Or maybe raw https://github.com/godbus/dbus
For running in containers please mount the host dbus into the container. This can simply be done by adding
-v /var/run/dbus:/var/run/dbus
to your docker run command. Depending on what kind of permissions are required you may need to add--privileged
to the command as well.Please evaluate...
The text was updated successfully, but these errors were encountered: