2
0
mirror of https://github.com/openkmip/pykmip synced 2025-12-10 13:23:15 +00:00

Adding custom configuration support

This change updates the KMIP client to support the custom selection of
client configuration options. This makes it easy to dynamically create
clients that connect to different backends. All unit demos have been
updated to support this feature.
This commit is contained in:
Peter Hamilton
2015-02-27 10:48:07 -05:00
parent 80ee64e600
commit 908aece78a
11 changed files with 40 additions and 27 deletions

View File

@@ -32,15 +32,16 @@ if __name__ == '__main__':
username = opts.username
password = opts.password
config = opts.config
# Build and setup logging and needed factories
# Build and setup logging
f_log = os.path.join(os.path.dirname(__file__), os.pardir, os.pardir,
'logconfig.ini')
logging.config.fileConfig(f_log)
logger = logging.getLogger(__name__)
# Build the client and connect to the server
client = KMIPProxy()
client = KMIPProxy(config=config)
client.open()
result = client.discover_versions()