Skip to content

Commit

Permalink
Deprecated pki group command
Browse files Browse the repository at this point in the history
The pki group command has been replaced with pki <subsystem>-group,
so it has been deprecated by adding a deprecated ProxyGroupCLI
class.

https://pagure.io/dogtagpki/issue/2536

Change-Id: Iebdef91d47c758a34e817b5379fa8f980e518862
  • Loading branch information
edewata committed Mar 15, 2018
1 parent 96df98a commit 5b73386
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 2 deletions.
4 changes: 2 additions & 2 deletions base/java-tools/src/com/netscape/cmstools/cli/MainCLI.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
import com.netscape.cmstools.ca.CACLI;
import com.netscape.cmstools.ca.CACertCLI;
import com.netscape.cmstools.client.ClientCLI;
import com.netscape.cmstools.group.GroupCLI;
import com.netscape.cmstools.group.ProxyGroupCLI;
import com.netscape.cmstools.key.KeyCLI;
import com.netscape.cmstools.kra.KRACLI;
import com.netscape.cmstools.ocsp.OCSPCLI;
Expand Down Expand Up @@ -103,7 +103,7 @@ public MainCLI() throws Exception {
addModule(new ClientCLI(this));

addModule(new ProxyCLI(new CACertCLI(this), "ca"));
addModule(new ProxyCLI(new GroupCLI(this), "ca"));
addModule(new ProxyGroupCLI(this));
addModule(new ProxyCLI(new KeyCLI(this), "kra"));
addModule(new ProxyCLI(new SecurityDomainCLI(this), "ca"));
addModule(new ProxyUserCLI(this));
Expand Down
38 changes: 38 additions & 0 deletions base/java-tools/src/com/netscape/cmstools/group/ProxyGroupCLI.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// --- BEGIN COPYRIGHT BLOCK ---
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; version 2 of the License.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this program; if not, write to the Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
// (C) 2018 Red Hat, Inc.
// All rights reserved.
// --- END COPYRIGHT BLOCK ---

package com.netscape.cmstools.group;

import com.netscape.cmstools.cli.CLI;
import com.netscape.cmstools.cli.ProxyCLI;

/**
* @deprecated pki group has been deprecated. Use pki &lt;subsystem&gt;-group instead.
*/
@Deprecated
public class ProxyGroupCLI extends ProxyCLI {

public ProxyGroupCLI(CLI parent) {
super(new GroupCLI(parent), "ca");
}

public void execute(String[] args) throws Exception {
System.err.println("WARNING: pki group has been deprecated. Use pki <subsystem>-group instead.");
super.execute(args);
}
}

0 comments on commit 5b73386

Please sign in to comment.