Bug 1379971 - [RFE]Change the CLI list-labcontrollers to labcontroller-list
Summary: [RFE]Change the CLI list-labcontrollers to labcontroller-list
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Community
Component: command line
Version: develop
Hardware: Unspecified
OS: Unspecified
unspecified
low vote
Target Milestone: 24.0
Assignee: Hui Wang
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-28 09:36 UTC by Hui Wang
Modified: 2017-02-21 18:50 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-21 18:50:45 UTC


Attachments (Terms of Use)

Description Hui Wang 2016-09-28 09:36:20 UTC
Description of problem:
CLI  list-labcontrollers is not consistent with job-list, distros-list and ect.
So propose to change it to labcontroller-list

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:

bkr list-labcontrollers

Expected results:

bkr labcontroller-list

Additional info:

Comment 1 Hui Wang 2016-09-29 03:50:01 UTC
https://gerrit.beaker-project.org/#/c/5285/

Comment 2 Dan Callaghan 2016-09-29 04:28:46 UTC
We can't remove the old command because that could break someone's scripts.

https://beaker-project.org/dev/guide/code-guidelines.html#api-compatibility

What we can do is leave the old command as a deprecated alias for the new command. We have done this with some server side commands in the past (log-delete -> beaker-log-delete) although never with bkr subcommands as far as I can remember.

Comment 3 Hui Wang 2016-09-29 05:22:50 UTC
(In reply to Dan Callaghan from comment #2)
> We can't remove the old command because that could break someone's scripts.
> 
> https://beaker-project.org/dev/guide/code-guidelines.html#api-compatibility
> 
> What we can do is leave the old command as a deprecated alias for the new
> command. We have done this with some server side commands in the past
> (log-delete -> beaker-log-delete) although never with bkr subcommands as far
> as I can remember.

I didn't considered the api-compatibility. That a good point. I will try alias.

Comment 4 Hui Wang 2016-10-11 07:52:22 UTC
(In reply to Dan Callaghan from comment #2)
> We can't remove the old command because that could break someone's scripts.
> 
> https://beaker-project.org/dev/guide/code-guidelines.html#api-compatibility
> 
> What we can do is leave the old command as a deprecated alias for the new
> command. We have done this with some server side commands in the past
> (log-delete -> beaker-log-delete) although never with bkr subcommands as far
> as I can remember.

How about the resolution below:

I just don't remove the CLI $bkr list-systems, but just hide the CLI in help.
The CLI $bkr list-systems is still existed and valid.
I just add new CLI bkr systemp-list. Only this New CLI can be shown in help.

Comment 5 Hui Wang 2016-10-11 07:56:40 UTC
Sorry, ignore last comment.

I just don't remove the CLI $bkr list-labcontrollers, but just hide the CLI in help.
The CLI $bkr list-labcontrollers is still existed and valid.
I just add new CLI bkr labcontroller-list. Only this New CLI can be shown in help.

Comment 6 Hui Wang 2016-10-13 03:59:46 UTC
It's not good to add two identical copies of cli.
Just in new cli file add the old command to inherit the new one:
class LabController_List(List_LabControllers): pass

Comment 7 Dan Callaghan 2016-10-21 03:34:35 UTC
This bug fix is included in beaker-client-24.0-0.git.143.42e2fdb which is currently available for download here:

https://beaker-project.org/nightlies/develop/

Comment 8 Hui Wang 2016-10-21 07:50:41 UTC
Verified this issue.
The result is PASS.
Version: 
beaker-client-24.0-0.git.143.42e2fdb

[root@dhcp-137-146 Downloads]# bkr labcontroller-list
lab-devel-02.rhts.eng.bos.redhat.com
lab-devel-03.rhts.eng.bos.redhat.com
beaker.rmancy.beakerdevs.lab.eng.bne.redhat.com
[root@dhcp-137-146 Downloads]# bkr labcontroller-list --help
Usage: bkr labcontroller-list

Options:
  --hub=URL                Connect to Beaker server at URL (overrides config file)
  --username=USERNAME      Use USERNAME for password authentication (overrides config file)
  --password=PASSWORD      Use PASSWORD for password authentication (overrides config file)
  --insecure               Skip SSL certificate validity checks
  --version                show program's version number and exit
  -h, --help               show this help message and exit

Comment 9 Dan Callaghan 2017-02-21 18:50:45 UTC
Beaker 24.0 has been released.


Note You need to log in before you can comment on or make changes to this bug.