remote/client: consider acquired places on search#1608
remote/client: consider acquired places on search#1608gumulka wants to merge 1 commit intolabgrid-project:masterfrom
Conversation
|
This change is missing a DCO. Additionally this change uses This change would make this harder to implement, since to enumerate all possible acquired places for a user we have to request all places or change the subscription mechanism. Note that the place pattern can not only be specified with the |
When requesting an acquired place, match the pattern only to the acquired places and not to every place. This also allows to skip the place on the commandline if only one place is acquired by the current user. Signed-off-by: Fabian Pflug <fabian.pflug@gumulka.eu>
b49d93f to
92d831a
Compare
|
"" is used, because it matches every pattern and is what is working with the current codebase without rewriting more parts about getting places. I could not look into the future of the project when writing it. I'm well aware of the environment variable. but since I mostly only have one place acquired, but I'm working with multiple terminals, it is easier to not think about what I have acquired and just accept it. If it is in the way for future development and is hindering it, I'm okay with not accepting it. |
When requesting an acquired place, match the pattern only to the acquired places and not to every place.
This also allows to skip the place on the command line if only one place is acquired by the current user.
Description
Checklist
I skipped documentation and automatic tests for this feature and I'm not sure about the documentation, because it is a change on how the client behaves from a user perspective.
On the one hand, the behavior before was not documented and only know through usage, the behavior afterwards will also only be known through usage and is not documented. Not sure on where to document it either.
Test case locally was that I created three boards with an serial port:
Afterwards, I acquired board-1 and other-1, then called
labgrid-client console, which resulted in an error, that there are two places acquired.labgrid-client -p board consoleresulted in the console and after releasingboard-1, thenlabgrid-client consoleresulted in a console.