2
0
mirror of https://github.com/openkmip/pykmip synced 2026-01-05 18:13:18 +00:00

Add client support for custom configuration file paths

This change adds client support for setting custom configuration
file paths, allowing users and developers to place their settings
file wherever they want. All client demo scripts have been updated
to support a '-s' flag that can be used to set the configuration
file for the demo. Client unit tests have also been updated to
include this change.
This commit is contained in:
Peter Hamilton
2018-04-17 14:41:04 -04:00
parent 583559195f
commit f9e32552f8
33 changed files with 166 additions and 45 deletions

View File

@@ -61,7 +61,8 @@ class ProxyKmipClient(object):
ssl_version=None,
username=None,
password=None,
config='client'):
config='client',
config_file=None):
"""
Construct a ProxyKmipClient.
@@ -88,6 +89,9 @@ class ProxyKmipClient(object):
file. Use to load a specific set of configuration settings from
the configuration file, instead of specifying them manually.
Optional, defaults to the default client section, 'client'.
config_file (string): The path to the client's configuration file.
Optional, defaults to None.
"""
self.logger = logging.getLogger()
@@ -104,7 +108,9 @@ class ProxyKmipClient(object):
ssl_version=ssl_version,
username=username,
password=password,
config=config)
config=config,
config_file=config_file
)
# TODO (peter-hamilton) Add a multiprocessing lock for synchronization.
self._is_open = False