Bug 1379971

Summary: [RFE]Change the CLI list-labcontrollers to labcontroller-list
Product: [Retired] Beaker Reporter: Hui Wang <huiwang>
Component: command lineAssignee: Hui Wang <huiwang>
Status: CLOSED CURRENTRELEASE QA Contact: tools-bugs <tools-bugs>
Severity: low Docs Contact:
Priority: unspecified    
Version: developCC: dcallagh, mjia, rjoost
Target Milestone: 24.0Keywords: FutureFeature, Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-21 18:50:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.