Open bhoopesh369 opened 4 months ago
It seems we can't get the lease info via dbus for systemd-networkd. Dbus does not expose the info.
So the only way to to parse all the lease files present in the /run/systemd/netif/leases
folder.
WDYT? @glimchb
The maximum info we can get via dbus is:
array [
dict entry(
string "OperationalState"
variant string "routable"
)
dict entry(
string "CarrierState"
variant string "carrier"
)
dict entry(
string "AddressState"
variant string "routable"
)
dict entry(
string "IPv4AddressState"
variant string "routable"
)
dict entry(
string "IPv6AddressState"
variant string "degraded"
)
dict entry(
string "OnlineState"
variant string "online"
)
dict entry(
string "AdministrativeState"
variant string "configured"
)
dict entry(
string "BitRates"
variant struct {
uint64 18446744073709551615
uint64 18446744073709551615
}
)
]
It seems we can't get the lease info via dbus for systemd-networkd. Dbus does not expose the info. So the only way to to parse all the lease files present in the
/run/systemd/netif/leases
folder.WDYT? @glimchb
copy paste please an example of this folder
See xPU sZTP provisioning block
today we pass lease file via cmdline arguments like this: --dhcp-lease-file /var/lib/dhclient/dhclient.leases.
for detecting this automatically using Network manger : https://github.com/opiproject/sztp/issues/418 but if detection through Network Manager doesn't work, we can then look through networkd same as the above
can we detect that info automatically from networkd over dbus?