diff options
Diffstat (limited to 'ipalib/plugins')
-rw-r--r-- | ipalib/plugins/batch.py | 14 | ||||
-rw-r--r-- | ipalib/plugins/ping.py | 3 |
2 files changed, 15 insertions, 2 deletions
diff --git a/ipalib/plugins/batch.py b/ipalib/plugins/batch.py index 07c50600a..f6f662f28 100644 --- a/ipalib/plugins/batch.py +++ b/ipalib/plugins/batch.py @@ -33,7 +33,7 @@ where the contenst of the file batch_request.json follow the below example {"method":"user_show","params":[["admin"],{"all":true}]} ],{}],"id":1} -THe format of the response is nested the same way. At the top you will see +The format of the response is nested the same way. At the top you will see "error": null, "id": 1, "result": { @@ -51,6 +51,7 @@ from ipalib import Str, List from ipalib.output import Output from ipalib import output from ipalib.text import _ +from ipapython.version import API_VERSION class batch(Command): INTERNAL = True @@ -61,6 +62,17 @@ class batch(Command): ), ) + take_options = ( + Str('version', + cli_name='version', + doc=_('Client version. Used to determine if server will accept request.'), + exclude='webui', + flags=['no_option', 'no_output'], + default=API_VERSION, + autofill=True, + ) + ) + has_output = ( Output('count', int, doc=_('')), Output('results', list, doc=_('')) diff --git a/ipalib/plugins/ping.py b/ipalib/plugins/ping.py index 634c4f875..c2f9b6b28 100644 --- a/ipalib/plugins/ping.py +++ b/ipalib/plugins/ping.py @@ -23,6 +23,7 @@ Ping the remote IPA server from ipalib import api from ipalib import Command from ipalib import output +from ipapython.version import VERSION, API_VERSION class ping(Command): """ @@ -37,6 +38,6 @@ class ping(Command): A possible enhancement would be to take an argument and echo it back but a fixed value works for now. """ - return dict(summary=u'pong') + return dict(summary=u'IPA server version %s. API version %s' % (VERSION, API_VERSION)) api.register(ping) |