mirror of
https://github.com/openkmip/pykmip
synced 2025-12-23 19:53:24 +00:00
Add server support for customizing the backend storage file
This change updates the server, adding in support for customizing the backend storage file used to store all server data. The server currently uses a simple SQLite database for storage. Prior versions of the server kept this database file in /tmp, to emphasize the testing focus of the server. This change loosens that restriction, now allowing users to customize where the database file lives. A new configuration option, 'database_path', has been added that will override the default /tmp location for the database file. This value can also be passed in if invoking the server via script using the '-d' flag.
This commit is contained in:
@@ -121,7 +121,8 @@ class TestKmipServer(testtools.TestCase):
|
||||
'/etc/pykmip/policies',
|
||||
False,
|
||||
'TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA',
|
||||
'DEBUG'
|
||||
'DEBUG',
|
||||
'/var/pykmip/pykmip.db'
|
||||
)
|
||||
|
||||
s.config.load_settings.assert_called_with('/etc/pykmip/server.conf')
|
||||
@@ -156,6 +157,10 @@ class TestKmipServer(testtools.TestCase):
|
||||
]
|
||||
)
|
||||
s.config.set_setting.assert_any_call('logging_level', 'DEBUG')
|
||||
s.config.set_setting.assert_any_call(
|
||||
'database_path',
|
||||
'/var/pykmip/pykmip.db'
|
||||
)
|
||||
|
||||
# Test that an attempt is made to instantiate the TLS 1.2 auth suite
|
||||
s = server.KmipServer(
|
||||
|
||||
Reference in New Issue
Block a user