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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user