diff options
author | Rob Crittenden <rcritten@redhat.com> | 2008-05-08 11:45:38 -0400 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2008-05-08 13:01:27 -0400 |
commit | bd9dea888d62c6a3cdacecc5356b0b9faff225d6 (patch) | |
tree | 588514a8cd88eabc6b98277d9ee26ae70033f5c0 /ipa-server/xmlrpc-server | |
parent | 24f43bc8467f1ded94aec03e00f05138de563ee8 (diff) | |
download | freeipa-bd9dea888d62c6a3cdacecc5356b0b9faff225d6.tar.gz freeipa-bd9dea888d62c6a3cdacecc5356b0b9faff225d6.tar.xz freeipa-bd9dea888d62c6a3cdacecc5356b0b9faff225d6.zip |
Add a version API to the server so it knows what version it is.
435019
Diffstat (limited to 'ipa-server/xmlrpc-server')
-rw-r--r-- | ipa-server/xmlrpc-server/funcs.py | 5 | ||||
-rw-r--r-- | ipa-server/xmlrpc-server/ipaxmlrpc.py | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/ipa-server/xmlrpc-server/funcs.py b/ipa-server/xmlrpc-server/funcs.py index d83fed09e..351632653 100644 --- a/ipa-server/xmlrpc-server/funcs.py +++ b/ipa-server/xmlrpc-server/funcs.py @@ -26,6 +26,7 @@ import ipaserver.dsinstance import ipaserver.ipaldap import copy from ipaserver import attrs +from ipaserver import version from ipa import ipaerror from ipa import ipautil from urllib import quote,unquote @@ -383,6 +384,10 @@ class IPAServer: return True # Higher-level API + def version(self, opts=None): + """The version of IPA""" + logging.debug("IPA: version") + return ipaserver.version.NUM_VERSION def get_aci_entry(self, sattrs, opts=None): """Returns the entry containing access control ACIs.""" diff --git a/ipa-server/xmlrpc-server/ipaxmlrpc.py b/ipa-server/xmlrpc-server/ipaxmlrpc.py index 95f2352aa..4e2ad3522 100644 --- a/ipa-server/xmlrpc-server/ipaxmlrpc.py +++ b/ipa-server/xmlrpc-server/ipaxmlrpc.py @@ -324,6 +324,7 @@ def handler(req, profiling=False): try: f = funcs.IPAServer() h = ModXMLRPCRequestHandler() + h.register_function(f.version) h.register_function(f.get_aci_entry) h.register_function(f.get_entry_by_dn) h.register_function(f.get_entry_by_cn) |