A mock implementation of a key manager that stores keys in a dictionary.
This key manager implementation is primarily intended for testing. In particular, it does not store keys persistently. Lack of a centralized key store also makes this implementation unsuitable for use among different services.
Note: Instantiating this class multiple times will create separate key stores. Keys created in one instance will not be accessible from other instances of this class.
Bases: nova.keymgr.key_mgr.KeyManager
This mock key manager implementation supports all the methods specified by the key manager interface. This implementation stores keys within a dictionary, and as a result, it is not acceptable for use across different services. Side effects (e.g., raising exceptions) for each method are handled as specified by the key manager interface.
This key manager is not suitable for use in production deployments.
Creates a key.
This implementation returns a UUID for the created key. A Forbidden exception is raised if the specified context is None.
Deletes the key identified by the specified id.
A Forbidden exception is raised if the context is None and a KeyError is raised if the UUID is invalid.
Retrieves the key identified by the specified id.
This implementation returns the key that is associated with the specified UUID. A Forbidden exception is raised if the specified context is None; a KeyError is raised if the UUID is invalid.
Stores (i.e., registers) a key with the key manager.