mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-07-29 23:58:23 -05:00
Revert "Add 'ipa localenv' subcommand"
This reverts commit 1166fbc494. The proper fix
is to restore pre-thin client behavior of commands inheriting from
LocalOrRemote class.
https://fedorahosted.org/freeipa/ticket/6490
Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
This commit is contained in:
+1
-5
@@ -65,17 +65,13 @@ The principal function of the CLI is to execute administrative commands specifie
|
|||||||
|
|
||||||
From the implementation perspective, the CLI distinguishes two types of commands \- built\-ins and plugin provided.
|
From the implementation perspective, the CLI distinguishes two types of commands \- built\-ins and plugin provided.
|
||||||
|
|
||||||
Built\-in commands are static and are all available in all installations of IPA. There are three of them:
|
Built\-in commands are static and are all available in all installations of IPA. There are two of them:
|
||||||
.TP
|
.TP
|
||||||
\fBconsole\fR
|
\fBconsole\fR
|
||||||
Start the IPA interactive Python console.
|
Start the IPA interactive Python console.
|
||||||
.TP
|
.TP
|
||||||
\fBhelp\fR [\fITOPIC\fR | \fICOMMAND\fR | \fBtopics\fR | \fBcommands\fR]
|
\fBhelp\fR [\fITOPIC\fR | \fICOMMAND\fR | \fBtopics\fR | \fBcommands\fR]
|
||||||
Display help for a command or topic.
|
Display help for a command or topic.
|
||||||
\fBlocal-env\fR
|
|
||||||
Show local IPA api.env values.
|
|
||||||
.TP
|
|
||||||
|
|
||||||
|
|
||||||
The \fBhelp\fR command invokes the built\-in documentation system. Without parameters a list of built\-in commands and help topics is displayed. Help topics are generated from loaded IPA plugin modules. Executing \fBhelp\fR with the name of an available topic displays a help message provided by the corresponding plugin module and list of commands it contains.
|
The \fBhelp\fR command invokes the built\-in documentation system. Without parameters a list of built\-in commands and help topics is displayed. Help topics are generated from loaded IPA plugin modules. Executing \fBhelp\fR with the name of an available topic displays a help message provided by the corresponding plugin module and list of commands it contains.
|
||||||
.LP
|
.LP
|
||||||
|
|||||||
@@ -54,7 +54,6 @@ from ipalib.constants import CLI_TAB, LDAP_GENERALIZED_TIME_FORMAT
|
|||||||
from ipalib.parameters import File, Str, Enum, Any, Flag
|
from ipalib.parameters import File, Str, Enum, Any, Flag
|
||||||
from ipalib.text import _
|
from ipalib.text import _
|
||||||
from ipalib import api # pylint: disable=unused-import
|
from ipalib import api # pylint: disable=unused-import
|
||||||
from ipapython.dn import DN
|
|
||||||
from ipapython.dnsutil import DNSName
|
from ipapython.dnsutil import DNSName
|
||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
@@ -860,28 +859,6 @@ class help(frontend.Local):
|
|||||||
writer(_(' ipa <command> --help'))
|
writer(_(' ipa <command> --help'))
|
||||||
writer()
|
writer()
|
||||||
|
|
||||||
|
|
||||||
class local_env(frontend.Local):
|
|
||||||
"""Dump local api.env vars
|
|
||||||
"""
|
|
||||||
|
|
||||||
takes_args = ()
|
|
||||||
takes_options = ()
|
|
||||||
has_output = ()
|
|
||||||
topic = None
|
|
||||||
|
|
||||||
def run(self, *args, **options):
|
|
||||||
for key in sorted(self.api.env):
|
|
||||||
value = getattr(api.env, key)
|
|
||||||
if isinstance(value, DN):
|
|
||||||
value = unicode(value)
|
|
||||||
if isinstance(value, (str, unicode)):
|
|
||||||
# shell escape
|
|
||||||
value = value.replace(r'"', r'\"')
|
|
||||||
value = value.replace('$', r'$$')
|
|
||||||
print('{}="{}"'.format(key, value))
|
|
||||||
|
|
||||||
|
|
||||||
class show_mappings(frontend.Command):
|
class show_mappings(frontend.Command):
|
||||||
"""
|
"""
|
||||||
Show mapping of LDAP attributes to command-line option.
|
Show mapping of LDAP attributes to command-line option.
|
||||||
@@ -1359,7 +1336,6 @@ cli_plugins = (
|
|||||||
console,
|
console,
|
||||||
help,
|
help,
|
||||||
show_mappings,
|
show_mappings,
|
||||||
local_env,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user