Bug 1272891

Summary: [platformmanagement_public_484] The deprecated flag "--existing" is still in examples stanza for `openshift ex sync-groups -h`
Product: OKD Reporter: weiwei jiang <wjiang>
Component: ocAssignee: Fabiano Franz <ffranz>
Status: CLOSED CURRENTRELEASE QA Contact: Wei Sun <wsun>
Severity: low Docs Contact:
Priority: low    
Version: 3.xCC: aos-bugs, mmccomas, wsun
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-12 17:13:26 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 weiwei jiang 2015-10-19 07:37:32 UTC
Description of problem:
When check the help info for openshift ex sync-groups, the examples stanza contain the flag "--existing" which is deprecated

# openshift ex sync-groups -h
Sync OpenShift Groups with records from an external provider.

In order to sync OpenShift Group records with those from an external provider, determine which Groups you wish
to sync and where their records live. For instance, all or some groups may be selected from the current Groups
stored in OpenShift that have been synced previously, or similarly all or some groups may be selected from those                                                
stored on an LDAP server. The path to a sync configuration file is required in order to describe how data is 
requested from the external record store and migrated to OpenShift records. Default behavior is to sync all 
groups from the LDAP server returned by the LDAP query templates.

Usage:
  openshift ex sync-groups [SOURCE SCOPE WHITELIST --whitelist=WHITELIST-FILE] --sync-config=CONFIG-SOURCE [options]

Examples:
  # Sync all groups from an LDAP server
  $ openshift ex sync-groups --sync-config=/path/to/ldap-sync-config.yaml

  # Sync all groups except the ones from the blacklist file from an LDAP server
  $ openshift ex sync-groups --blacklist=/path/to/blacklist.txt --sync-config=/path/to/ldap-sync-config.yaml

  # Sync specific groups specified in a whitelist file with an LDAP server 
  $ openshift ex sync-groups --whitelist=/path/to/whitelist.txt --sync-config=/path/to/sync-config.yaml

  # Sync all OpenShift Groups that have been synced previously with an LDAP server
  $ openshift ex sync-groups --existing --sync-config=/path/to/ldap-sync-config.yaml

  # Sync specific OpenShift Groups if they have been synced previously with an LDAP server
  $ openshift ex sync-groups groups/group1 groups/group2 groups/group3 --sync-config=/path/to/sync-config.yaml

Options:
      --blacklist='': path to the group blacklist file
      --confirm=false: if true, modify OpenShift groups; if false, display groups
      --no-headers=false: When using the default output, don't print headers.
  -o, --output='yaml': Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md].
      --output-version='': Output the formatted object with the given version (default api-version).
  -a, --show-all=false: When printing, show all resources (default hide terminated pods.)
      --sort-by='': If non-empty, sort list types using this field specification.  The field specification is expressed as a JSONPath expression (e.g. 'ObjectMeta.Name'). The field in the API resource specified by this JSONPath expression must be an integer or a string.
      --sync-config='': path to the sync config
  -t, --template='': Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
      --type='ldap': type of group used to locate LDAP group UIDs: ldap,openshift
      --whitelist='': path to the group whitelist file

Use "openshift options" for a list of global command-line options (applies to all commands).

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

How reproducible:
always

Steps to Reproduce:
1. Checked the help info for `openshift ex sync-groups`
2.
3.

Actual results:
The help info contain the deprecated flag "--existing".

Expected results:
Should not contain deprecated flag.

Additional info:

Comment 1 Fabiano Franz 2016-01-11 19:57:52 UTC
Fixed in master.

Comment 2 weiwei jiang 2016-01-12 10:18:46 UTC
Checked with devenv-rhel7_3120, and the issue has been fixed.

# openshift ex sync-groups -h
Sync OpenShift Groups with records from an external provider.

...

Usage:
  openshift ex sync-groups [--type=TYPE] [WHITELIST] [--whitelist=WHITELIST-FILE] --sync-config=CONFIG-FILE [--confirm] [options]

Examples:
  # Sync all groups from an LDAP server
  $ openshift ex sync-groups --sync-config=/path/to/ldap-sync-config.yaml --confirm

  # Sync all groups except the ones from the blacklist file from an LDAP server
  $ openshift ex sync-groups --blacklist=/path/to/blacklist.txt --sync-config=/path/to/ldap-sync-config.yaml --confirm

  # Sync specific groups specified in a whitelist file with an LDAP server 
  $ openshift ex sync-groups --whitelist=/path/to/whitelist.txt --sync-config=/path/to/sync-config.yaml --confirm

  # Sync all OpenShift Groups that have been synced previously with an LDAP server
  $ openshift ex sync-groups --type=openshift --sync-config=/path/to/ldap-sync-config.yaml --confirm

  # Sync specific OpenShift Groups if they have been synced previously with an LDAP server
  $ openshift ex sync-groups groups/group1 groups/group2 groups/group3 --sync-config=/path/to/sync-config.yaml --confirm

...