diff options
| author | Jan Cholasta <jcholast@redhat.com> | 2017-02-17 11:25:17 +0100 |
|---|---|---|
| committer | Martin Basti <mbasti@redhat.com> | 2017-03-13 16:02:16 +0100 |
| commit | 98bb5397c535e5e1a6c5ade9f0fb918be1d282c3 (patch) | |
| tree | cfdbbdafd6370e21eae0052d462511d82934ebb7 /ipaclient/remote_plugins | |
| parent | 8295848bfec6f96410ab8383107fdaf565f02974 (diff) | |
| download | freeipa-98bb5397c535e5e1a6c5ade9f0fb918be1d282c3.tar.gz freeipa-98bb5397c535e5e1a6c5ade9f0fb918be1d282c3.tar.xz freeipa-98bb5397c535e5e1a6c5ade9f0fb918be1d282c3.zip | |
vault: cache the transport certificate on client
Cache the KRA transport certificate on disk (in ~/.cache/ipa) as well as
in memory.
https://fedorahosted.org/freeipa/ticket/6652
Reviewed-By: Martin Basti <mbasti@redhat.com>
Reviewed-By: Christian Heimes <cheimes@redhat.com>
Diffstat (limited to 'ipaclient/remote_plugins')
| -rw-r--r-- | ipaclient/remote_plugins/__init__.py | 3 | ||||
| -rw-r--r-- | ipaclient/remote_plugins/schema.py | 12 |
2 files changed, 3 insertions, 12 deletions
diff --git a/ipaclient/remote_plugins/__init__.py b/ipaclient/remote_plugins/__init__.py index 037dd6f67..63fe39aa8 100644 --- a/ipaclient/remote_plugins/__init__.py +++ b/ipaclient/remote_plugins/__init__.py @@ -12,6 +12,7 @@ import time from . import compat from . import schema from ipaclient.plugins.rpcclient import rpcclient +from ipalib.constants import USER_CACHE_PATH from ipapython.dnsutil import DNSName from ipapython.ipa_log_manager import log_mgr @@ -19,7 +20,7 @@ logger = log_mgr.get_logger(__name__) class ServerInfo(collections.MutableMapping): - _DIR = os.path.join(schema.USER_CACHE_PATH, 'ipa', 'servers') + _DIR = os.path.join(USER_CACHE_PATH, 'ipa', 'servers') def __init__(self, api): hostname = DNSName(api.env.server).ToASCII() diff --git a/ipaclient/remote_plugins/schema.py b/ipaclient/remote_plugins/schema.py index 0cdce9d03..3ecd608f9 100644 --- a/ipaclient/remote_plugins/schema.py +++ b/ipaclient/remote_plugins/schema.py @@ -15,6 +15,7 @@ import six from ipaclient.frontend import ClientCommand, ClientMethod from ipalib import errors, parameters, plugable +from ipalib.constants import USER_CACHE_PATH from ipalib.errors import SchemaUpToDate from ipalib.frontend import Object from ipalib.output import Output @@ -29,17 +30,6 @@ FORMAT = '1' if six.PY3: unicode = str -USER_CACHE_PATH = ( - os.environ.get('XDG_CACHE_HOME') or - os.path.join( - os.environ.get( - 'HOME', - os.path.expanduser('~') - ), - '.cache' - ) -) - _TYPES = { 'DN': DN, 'DNSName': DNSName, |
