labgrid-project / labgrid-project/labgrid

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

Open
#1,634 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
528
Forks
278
Avg merge
2d 19h
Merged PRs (30d)
4

Description

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()

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate RawNetworkInterfaceDriver and compare its interface with NetworkInterfaceDriver's lease-related behavior. Check the dhclient release and renew commands plus dnsmasq.conf and its dhcp-leasefile default; done means the requested methods work for non-NetworkManager systems and expose the lease information.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
embedded-iot, networking
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.