Bug 1441397 - bash completion for all subscription-manager modules is failing to present the new "--noproxy" option
Summary: bash completion for all subscription-manager modules is failing to present th...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.4
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Jiri Hnidek
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-11 21:01 UTC by John Sefler
Modified: 2017-08-01 19:22 UTC (History)
5 users (show)

Fixed In Version: subscription-manager-1.19.18-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 19:22:43 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Github candlepin subscription-manager pull 1638 None None None 2017-05-24 11:25:48 UTC
Github candlepin subscription-manager pull 1645 None None None 2017-05-31 13:22:11 UTC
Red Hat Product Errata RHBA-2017:2083 normal SHIPPED_LIVE python-rhsm and subscription-manager bug fix and enhancement update 2017-08-01 18:14:19 UTC

Description John Sefler 2017-04-11 21:01:55 UTC
Description of problem:
Recently added to the command line options for most all subscription-manager modules is a new option called "--noproxy".  This was added by the fix for bug 1420533..
https://github.com/candlepin/subscription-manager/pull/1551

The new "--noproxy" is currently failing to bash complete (also known as tab completion).


Version-Release number of selected component (if applicable):
[root@jsefler-rhel7 ~]# rpm -q subscription-manager python-rhsm bash-completion
subscription-manager-1.19.6-1.git.4.8a8fb32.el7.x86_64
python-rhsm-1.19.4-1.git.0.8a8fb32.el7.x86_64
bash-completion-2.1-6.el7.noarch


How reproducible:


Steps to Reproduce:
[root@jsefler-rhel7 ~]# subscription-manager unregister --help
Usage: subscription-manager unregister [OPTIONS]

Unregister this system from the Customer Portal or another subscription
management service

Options:
  -h, --help            show this help message and exit
  --proxy=PROXY_URL     proxy URL in the form of proxy_hostname:proxy_port
  --proxyuser=PROXY_USER
                        user for HTTP proxy with basic authentication
  --proxypassword=PROXY_PASSWORD
                        password for HTTP proxy with basic authentication
  --noproxy=NO_PROXY    host suffixes that should bypass HTTP proxy


[root@jsefler-rhel7 ~]# subscription-manager unregister --<TAB><TAB>
-h               --proxy          --proxyuser
--help           --proxypassword  


Actual results:
Observe that the help for the unregister module includes the new "--noproxy" option.  However when trying to tab complete on the command line, the "--noproxy" option is not presented as an option.
-h               --proxy          --proxyuser
--help           --proxypassword  

Expected results:
-h               --proxy          --proxyuser
--help           --proxypassword  --noproxy


Additional info:

Comment 2 John Sefler 2017-04-11 21:23:03 UTC
bash completion of --noproxy is also failing for "rhsm-debug system"....

[root@jsefler-rhel7 ~]# rhsm-debug system --help
Usage: rhsm-debug system [OPTIONS] 

Assemble system information as a tar file or directory

Options:
  -h, --help            show this help message and exit
  --proxy=PROXY_URL     proxy URL in the form of proxy_hostname:proxy_port
  --proxyuser=PROXY_USER
                        user for HTTP proxy with basic authentication
  --proxypassword=PROXY_PASSWORD
                        password for HTTP proxy with basic authentication
  --noproxy=NO_PROXY    host suffixes that should bypass HTTP proxy
  --destination=DESTINATION
                        the destination location of the result; default is
                        /tmp
  --no-archive          data will be in an uncompressed directory
  --sos                 only data not already included in sos report will be
                        collected

[root@jsefler-rhel7 ~]# rhsm-debug system --<TAB><TAB>
--destination    --no-archive     --proxypassword  --sos            
--help           --proxy          --proxyuser      


Actual Results:
above

Expected Results:
--destination    --no-archive     --proxypassword  --sos            
--help           --proxy          --proxyuser      --noproxy

Comment 4 Rehana 2017-05-31 10:14:20 UTC
Reproducing the failure:
=======================
subscription-manager: 1.19.15-1.el7
python-rhsm: 1.19.6-1.el7

[root@ibm-x3250m3-01 ~]# subscription-manager unregister --
--help           --proxy          --proxypassword  --proxyuser    


Verifying the on latest subscripton-manager build:
==================================================

# subscription-manager version
server type: This system is currently not registered.
subscription management server: 2.1.1-1
subscription management rules: 5.23
subscription-manager: 1.19.17-1.el7
python-rhsm: 1.19.8-1.el7


# subscription-manager unregister --
--help           --noproxy        --proxy          --proxypassword  --proxyuser   

^^ --noproxy is listed for tab completion . however rhsm-debug (issue mentioned in comment 2 ) is still not fixed 

[root@dhcp151-206 ~]# rhsm-debug system --
--destination    --help           --no-archive     --proxy          --proxypassword  --proxyuser      --sos  

Moving back to "New" to fix the rhsm-debug tab completion for --noproxy option

Comment 5 Chris Snyder 2017-05-31 20:04:30 UTC
Merged the second PR. This should fix the failure.
Moving to MODIFIED.

Comment 7 Shwetha Kallesh 2017-06-07 07:16:51 UTC
Dont see bash completion for rhsm-debug with follwoing version , so moving bug back to new

[root@dhcp35-135 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.0.33-1
subscription management rules: 5.23
subscription-manager: 1.19.17-1.el7
python-rhsm: 1.19.8-1.el7


[root@dhcp35-135 ~]# rhsm-debug system --
--destination    --help           --no-archive     --proxy          --proxypassword  --proxyuser      --sos

Comment 9 Rehana 2017-06-08 10:28:51 UTC
Verifying on:
=============

# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.1.1-1
subscription management rules: 5.23
subscription-manager: 1.19.18-1.el7
python-rhsm: 1.19.9-1.el7

# rhsm-debug system --<TAB> <TAB>
--destination    --help           --no-archive     --noproxy        --proxy          --proxypassword  --proxyuser      --sos            

# rhsm-debug system --no<TAB>
--no-archive  --noproxy     

Observed that now the bash completion for --noproxy works on rhsm-debug command. 

Moving this bug to Verified.

Comment 10 errata-xmlrpc 2017-08-01 19:22:43 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2083


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