summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ipa.17
-rw-r--r--ipalib/backend.py2
-rw-r--r--ipalib/constants.py2
-rw-r--r--ipalib/plugable.py6
-rw-r--r--ipalib/rpc.py4
5 files changed, 12 insertions, 9 deletions
diff --git a/ipa.1 b/ipa.1
index 47157246..67a12375 100644
--- a/ipa.1
+++ b/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).
diff --git a/ipalib/backend.py b/ipalib/backend.py
index 03f4ce39..b17c517a 100644
--- a/ipalib/backend.py
+++ b/ipalib/backend.py
@@ -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)
diff --git a/ipalib/constants.py b/ipalib/constants.py
index 02d9f6f7..05fa1e66 100644
--- a/ipalib/constants.py
+++ b/ipalib/constants.py
@@ -118,7 +118,7 @@ DEFAULT_CONFIG = (
('webui_assets_dir', None),
# Debugging:
- ('verbose', False),
+ ('verbose', 0),
('debug', False),
('mode', 'production'),
diff --git a/ipalib/plugable.py b/ipalib/plugable.py
index ded762d1..397004eb 100644
--- a/ipalib/plugable.py
+++ b/ipalib/plugable.py
@@ -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',
diff --git a/ipalib/rpc.py b/ipalib/rpc.py
index e7f33384..f9067d1b 100644
--- a/ipalib/rpc.py
+++ b/ipalib/rpc.py
@@ -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):