summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ipalib/__init__.py2
-rw-r--r--ipalib/config.py4
-rw-r--r--ipalib/constants.py6
3 files changed, 11 insertions, 1 deletions
diff --git a/ipalib/__init__.py b/ipalib/__init__.py
index 0f9f54970..7fd886cbc 100644
--- a/ipalib/__init__.py
+++ b/ipalib/__init__.py
@@ -701,7 +701,7 @@ plugin (or plugins) is imported. For example:
1
>>> api.bootstrap(in_server=True) # We want to execute, not forward
>>> len(api.env)
-32
+36
`Env._bootstrap()`, which is called by `API.bootstrap()`, will create several
run-time variables that connot be overriden in configuration files or through
diff --git a/ipalib/config.py b/ipalib/config.py
index 3544331df..735cf0a1f 100644
--- a/ipalib/config.py
+++ b/ipalib/config.py
@@ -34,6 +34,7 @@ from types import NoneType
import os
from os import path
import sys
+from socket import gethostname
from base import check_name
from constants import CONFIG_SECTION
@@ -426,6 +427,7 @@ class Env(object):
self.__doing('_bootstrap')
# Set run-time variables:
+ self.host = gethostname()
self.ipalib = path.dirname(path.abspath(__file__))
self.site_packages = path.dirname(self.ipalib)
self.script = path.abspath(sys.argv[0])
@@ -499,6 +501,8 @@ class Env(object):
self.log = path.join(self.dot_ipa, 'log', name)
else:
self.log = path.join('/', 'var', 'log', 'ipa', name)
+ if 'ca_host' not in self:
+ self.ca_host = self.host
self._merge(**defaults)
def _finalize(self, **lastchance):
diff --git a/ipalib/constants.py b/ipalib/constants.py
index e229b466c..14f7f25d4 100644
--- a/ipalib/constants.py
+++ b/ipalib/constants.py
@@ -99,6 +99,11 @@ DEFAULT_CONFIG = (
('debug', False),
('mode', 'production'),
+ # CA plugin:
+ ('ca_host', object), # Set in Env._finalize_core()
+ ('ca_port', 9180),
+ ('ca_ssl_port', 9443),
+
# ********************************************************
# The remaining keys are never set from the values here!
# ********************************************************
@@ -116,6 +121,7 @@ DEFAULT_CONFIG = (
# raised.
# Set in Env.__init__():
+ ('host', object),
('ipalib', object), # The directory containing ipalib/__init__.py
('site_packages', object), # The directory contaning ipalib
('script', object), # sys.argv[0]