Add list of available places#1581
Conversation
fe3fceb to
06b414b
Compare
|
I think "available" does not really fit the labgrid lingo, maybe "released" or "unlocked" are better candidates. |
ce322ba to
de5257d
Compare
|
@Bastian-Krause makes sense. Done. $ labgrid-client places -l
target-d-8F94FBAC4EC2DAB50539F2499000055A
$ labgrid-client places -a
target-d-8F94FBAC4EC2DAB50539F299900003D5
$ labgrid-client places
target-d-8F94FBAC4EC2DAB50539F2499000055A
target-d-8F94FBAC4EC2DAB50539F299900003D5
$ labgrid-client places --released
target-d-8F94FBAC4EC2DAB50539F2499000055A |
c1b598e to
69a8f24
Compare
|
For your consideration, an alternative would be to use: and then have --acquired and --no-acquired options used in the loop like so: This approach does not entail adding a new switch which is like the opposite of --acquired |
Bastian-Krause
left a comment
There was a problem hiding this comment.
Everything else looks fine to me.
labgrid/remote/client.py
Outdated
|
|
||
| subparser = subparsers.add_parser("places", aliases=("p",), help="list available places") | ||
| subparser.add_argument("-a", "--acquired", action="store_true") | ||
| subparser.add_argument("-l", "--released", action="store_true") |
There was a problem hiding this comment.
I've changed this to -r now.
69a8f24 to
e5e9181
Compare
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## master #1581 +/- ##
========================================
- Coverage 55.8% 55.8% -0.1%
========================================
Files 170 170
Lines 13380 13383 +3
========================================
+ Hits 7469 7470 +1
- Misses 5911 5913 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
Hi @Bastian-Krause sorry for the slow response and thanks for making the changes. Can we merge this? |
Signed-off-by: Ivan Stepic <ivan.stepic@bmw.de> [bst: renamed shortopt -l -> -r, replaced elif -> if for consistency] Signed-off-by: Bastian Krause <bst@pengutronix.de>
e5e9181 to
6a9901a
Compare
|
Thanks! |
Description
Clients sometimes want to know which places are available before acquiring the place.
Checklist
Original documentation for the feature already covers this PR, documented on command line, as --acquired.Tests for the feature, no, it's a simple changeTesting: