Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shelldriver: allow dashes and dots in device names #1373

Merged
merged 1 commit into from
Apr 30, 2024

Conversation

aparcar
Copy link
Contributor

@aparcar aparcar commented Apr 26, 2024

Description

The get_ip_addresses may be called with a specific device and returns alls IP addresses on that interface. Due to a limitation in the regex, devices including either dashes or dots aren't detected.

On the OpenWrt distributions the default device is called br-lan, usually connecting ethernet ports and WiFi devices. Likewise dots are attached to the device name to specify VLANs.

This commit extends the regex to support both dashes and dots.

Checklist

  • Documentation for the feature
    • This is just an extension of the feature, should it still be documented?
  • Tests for the feature
  • The arguments and description in doc/configuration.rst have been updated
    • No changes
  • Add a section on how to use the feature to doc/usage.rst
    • No changes
  • Add a section on how to use the feature to doc/development.rst
    • No changes
  • PR has been tested
  • Man pages have been regenerated

Copy link
Member

@Bastian-Krause Bastian-Krause left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, one minor nit pick.

tests/test_shelldriver.py Outdated Show resolved Hide resolved
The `get_ip_addresses` may be called with a specific device and returns
alls IP addresses on that interface. Due to a limitation in the regex,
devices including either dashes or dots aren't detected.

On the OpenWrt distributions the default device is called `br-lan`,
usually connecting ethernet ports and WiFi devices. Likewise dots are
attached to the device name to specify VLANs.

This commit extends the regex to support both dashes and dots.

Signed-off-by: Paul Spooren <[email protected]>
@Emantor Emantor merged commit acb438d into labgrid-project:master Apr 30, 2024
9 checks passed
@aparcar aparcar deleted the dashes_and_dots branch April 30, 2024 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants