Skip to content
Snippets Groups Projects
Commit 91c1a265 authored by Iustin Pop's avatar Iustin Pop
Browse files

Fix node partial name matching in Haskell code


This implements QffHostname and fixes the node listing (as well as
export listing when filtering on node name).

This bug was hidden by the fact that node listing with "gnt-node list
aa" works if you don't have live queries (as it was originally), as
the choosing of wanted nodes out of the config based on short names
works. What didn't work was later post-filtering based on such short
names (kind of duplicate, but that's how the code path is).

By implementing QffHostname, we can have custom equality checks, like
in the Python code. What I don't like is how convoluted the testing on
various left/right combinations is, but I didn't find an easier way.

The included unittest tests the partial filtering behaviour, and fails
if the node name flag is not set to QffHostname.

Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent e7124835
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment