mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Connect the -v cli argument to the verbose flag in xmlrpclib
If you pass two -v to the ipa command you'll get the XML-RPC data in the output. This can be handy so you know exactly what went out over the wire.
This commit is contained in:
parent
4924270b45
commit
1dd7b11b0b
7
ipa.1
7
ipa.1
@ -49,8 +49,11 @@ Display a help message with a list of options.
|
||||
\fB\-n\fR, \fB\-\-no\-prompt\fR
|
||||
Don't prompt for any parameters of \fBCOMMAND\fR, even if they are required.
|
||||
.TP
|
||||
\fB\-v\fR, \fB\-\-prompt\-all\fR
|
||||
Produce verbose output.
|
||||
\fB\-a\fR, \fB\-\-prompt\-all\fR
|
||||
Prompt for ALL values (even if optional)
|
||||
.TP
|
||||
\fB\-v\fR, \fB\-\-verbose\fR
|
||||
Produce verbose output. A second \-v displays the XML\-RPC request
|
||||
.SH "COMMANDS"
|
||||
The principal function of the CLI is to execute administrative commands specified by the \fICOMMAND\fR argument. The majority of commands are executed remotely over XML\-RPC on a IPA server listed in the configuration file (see FILES section of this manual page).
|
||||
|
||||
|
@ -109,7 +109,7 @@ class Executioner(Backend):
|
||||
if self.env.in_server:
|
||||
self.Backend.ldap2.connect(ccache=ccache)
|
||||
else:
|
||||
self.Backend.xmlclient.connect()
|
||||
self.Backend.xmlclient.connect(verbose=(self.env.verbose >= 2))
|
||||
if client_ip is not None:
|
||||
setattr(context, "client_ip", client_ip)
|
||||
|
||||
|
@ -118,7 +118,7 @@ DEFAULT_CONFIG = (
|
||||
('webui_assets_dir', None),
|
||||
|
||||
# Debugging:
|
||||
('verbose', False),
|
||||
('verbose', 0),
|
||||
('debug', False),
|
||||
('mode', 'production'),
|
||||
|
||||
|
@ -397,7 +397,7 @@ class API(DictProxy):
|
||||
stderr = logging.StreamHandler()
|
||||
if self.env.debug:
|
||||
stderr.setLevel(logging.DEBUG)
|
||||
elif self.env.verbose:
|
||||
elif self.env.verbose > 0:
|
||||
stderr.setLevel(logging.INFO)
|
||||
else:
|
||||
stderr.setLevel(logging.WARNING)
|
||||
@ -444,8 +444,8 @@ class API(DictProxy):
|
||||
parser.add_option('-d', '--debug', action='store_true',
|
||||
help='Produce full debuging output',
|
||||
)
|
||||
parser.add_option('-v', '--verbose', action='store_true',
|
||||
help='Produce more verbose output',
|
||||
parser.add_option('-v', '--verbose', action='count',
|
||||
help='Produce more verbose output. A second -v displays the XML-RPC request',
|
||||
)
|
||||
if context == 'cli':
|
||||
parser.add_option('-a', '--prompt-all', action='store_true',
|
||||
|
@ -374,11 +374,11 @@ class xmlclient(Connectible):
|
||||
super(xmlclient, self).__init__()
|
||||
self.__errors = dict((e.errno, e) for e in public_errors)
|
||||
|
||||
def create_connection(self, ccache=None):
|
||||
def create_connection(self, ccache=None, verbose=False):
|
||||
kw = dict(allow_none=True, encoding='UTF-8')
|
||||
if self.env.xmlrpc_uri.startswith('https://'):
|
||||
kw['transport'] = KerbTransport()
|
||||
kw['verbose'] = False
|
||||
kw['verbose'] = verbose
|
||||
return ServerProxy(self.env.xmlrpc_uri, **kw)
|
||||
|
||||
def destroy_connection(self):
|
||||
|
Loading…
Reference in New Issue
Block a user