diff options
author | Jason Gerard DeRose <jderose@redhat.com> | 2009-01-22 10:59:46 -0700 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2009-02-03 15:29:00 -0500 |
commit | 12c4879613f51c90239be749a777f480310b1318 (patch) | |
tree | c96ffd243b600ecfe6be8db42ec12a4c89674d80 /ipalib | |
parent | 6aadeb9aea60165d9c68b348dae4df456b00dfc4 (diff) | |
download | freeipa-12c4879613f51c90239be749a777f480310b1318.tar.gz freeipa-12c4879613f51c90239be749a777f480310b1318.tar.xz freeipa-12c4879613f51c90239be749a777f480310b1318.zip |
Added ca_host, ca_port, and ca_ssl_port Env variables that Andrew requested
Diffstat (limited to 'ipalib')
-rw-r--r-- | ipalib/__init__.py | 2 | ||||
-rw-r--r-- | ipalib/config.py | 4 | ||||
-rw-r--r-- | ipalib/constants.py | 6 |
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] |