Skip to content

Request: RawNetworkInterfaceDriver: add dhclient control and non-NetworkManager dnsmasq info functions #1634

@pmelange

Description

@pmelange

It would be nice to have the ability to control dhclient on the exporter's NetworkInterface resource to release a lease and to renew a lease. Adding this functionality to the RawNetworkInterfaceDriver makes more sense since the NetworkInterfaceDriver seems to be focused only on NetworkManager (sic) control.

suggested method names could be:
RawNetworkInterfaceDriver.dhclient_release()
RawNetworkInterfaceDriver.dhclient_renew()

Additionally, the NetworkInterfaceDriver has the ability to get a list of the NetworkManager controlled dnsmasq leases. For systems not using NetworkManager (sic), a similar method for RawNetworkInterface would be nice to have. The method could assume that /etc/dnsmasq.conf is the config file and check it for the attribute dhcp-leasefile which if unset defaults to /var/lib/misc/dnsmasq.leases reference. Also, the location of the dnsmasq.conf file could be a new attribute to RawNetworkInterfaceDriver.

suggested method name could be:
RawNetworkInterfaceDriver.get_dhcpd_leases()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions