summaryrefslogtreecommitdiffstats
path: root/ipalib/constants.py
diff options
context:
space:
mode:
authorEndi Sukma Dewata <edewata@redhat.com>2011-12-20 19:45:57 -0600
committerEndi S. Dewata <edewata@redhat.com>2011-12-21 13:23:08 -0600
commit46d3abc450db20c3e4c0854dbf9e711f59db3bff (patch)
tree2798b4d6123ea840917f5f949b131d9c3bf6c767 /ipalib/constants.py
parentedd37d20198ba95ebabdbdbf8030f1ec1ecffb6b (diff)
downloadfreeipa-46d3abc450db20c3e4c0854dbf9e711f59db3bff.tar.gz
freeipa-46d3abc450db20c3e4c0854dbf9e711f59db3bff.tar.xz
freeipa-46d3abc450db20c3e4c0854dbf9e711f59db3bff.zip
Reload UI on server upgrade.
The JSON server has been modified to return the version number in all responses. The UI has been modified to keep the version obtained during env operation and check the version returned in subsequent operations. If the version changes the UI will reload itself. Ticket #946
Diffstat (limited to 'ipalib/constants.py')
-rw-r--r--ipalib/constants.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/ipalib/constants.py b/ipalib/constants.py
index 96cf3ba6..d984bbc2 100644
--- a/ipalib/constants.py
+++ b/ipalib/constants.py
@@ -22,6 +22,7 @@
All constants centralised in one file.
"""
import socket
+from ipapython.version import VERSION
try:
FQDN = socket.getfqdn()
except:
@@ -63,6 +64,8 @@ CONFIG_SECTION = 'global'
# This is a tuple instead of a dict so that it is immutable.
# To create a dict with this config, just "d = dict(DEFAULT_CONFIG)".
DEFAULT_CONFIG = (
+ ('version', VERSION),
+
# Domain, realm, basedn:
('domain', 'example.com'),
('realm', 'EXAMPLE.COM'),