remote/client: consider acquired places on search #1608
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 console
resulted in the console and after releasingboard-1
, thenlabgrid-client console
resulted in a console.