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:
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
|
\fB\-n\fR, \fB\-\-no\-prompt\fR
|
||||||
Don't prompt for any parameters of \fBCOMMAND\fR, even if they are required.
|
Don't prompt for any parameters of \fBCOMMAND\fR, even if they are required.
|
||||||
.TP
|
.TP
|
||||||
\fB\-v\fR, \fB\-\-prompt\-all\fR
|
\fB\-a\fR, \fB\-\-prompt\-all\fR
|
||||||
Produce verbose output.
|
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"
|
.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).
|
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:
|
if self.env.in_server:
|
||||||
self.Backend.ldap2.connect(ccache=ccache)
|
self.Backend.ldap2.connect(ccache=ccache)
|
||||||
else:
|
else:
|
||||||
self.Backend.xmlclient.connect()
|
self.Backend.xmlclient.connect(verbose=(self.env.verbose >= 2))
|
||||||
if client_ip is not None:
|
if client_ip is not None:
|
||||||
setattr(context, "client_ip", client_ip)
|
setattr(context, "client_ip", client_ip)
|
||||||
|
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ DEFAULT_CONFIG = (
|
|||||||
('webui_assets_dir', None),
|
('webui_assets_dir', None),
|
||||||
|
|
||||||
# Debugging:
|
# Debugging:
|
||||||
('verbose', False),
|
('verbose', 0),
|
||||||
('debug', False),
|
('debug', False),
|
||||||
('mode', 'production'),
|
('mode', 'production'),
|
||||||
|
|
||||||
|
|||||||
@@ -397,7 +397,7 @@ class API(DictProxy):
|
|||||||
stderr = logging.StreamHandler()
|
stderr = logging.StreamHandler()
|
||||||
if self.env.debug:
|
if self.env.debug:
|
||||||
stderr.setLevel(logging.DEBUG)
|
stderr.setLevel(logging.DEBUG)
|
||||||
elif self.env.verbose:
|
elif self.env.verbose > 0:
|
||||||
stderr.setLevel(logging.INFO)
|
stderr.setLevel(logging.INFO)
|
||||||
else:
|
else:
|
||||||
stderr.setLevel(logging.WARNING)
|
stderr.setLevel(logging.WARNING)
|
||||||
@@ -444,8 +444,8 @@ class API(DictProxy):
|
|||||||
parser.add_option('-d', '--debug', action='store_true',
|
parser.add_option('-d', '--debug', action='store_true',
|
||||||
help='Produce full debuging output',
|
help='Produce full debuging output',
|
||||||
)
|
)
|
||||||
parser.add_option('-v', '--verbose', action='store_true',
|
parser.add_option('-v', '--verbose', action='count',
|
||||||
help='Produce more verbose output',
|
help='Produce more verbose output. A second -v displays the XML-RPC request',
|
||||||
)
|
)
|
||||||
if context == 'cli':
|
if context == 'cli':
|
||||||
parser.add_option('-a', '--prompt-all', action='store_true',
|
parser.add_option('-a', '--prompt-all', action='store_true',
|
||||||
|
|||||||
@@ -374,11 +374,11 @@ class xmlclient(Connectible):
|
|||||||
super(xmlclient, self).__init__()
|
super(xmlclient, self).__init__()
|
||||||
self.__errors = dict((e.errno, e) for e in public_errors)
|
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')
|
kw = dict(allow_none=True, encoding='UTF-8')
|
||||||
if self.env.xmlrpc_uri.startswith('https://'):
|
if self.env.xmlrpc_uri.startswith('https://'):
|
||||||
kw['transport'] = KerbTransport()
|
kw['transport'] = KerbTransport()
|
||||||
kw['verbose'] = False
|
kw['verbose'] = verbose
|
||||||
return ServerProxy(self.env.xmlrpc_uri, **kw)
|
return ServerProxy(self.env.xmlrpc_uri, **kw)
|
||||||
|
|
||||||
def destroy_connection(self):
|
def destroy_connection(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user