2
0
mirror of https://github.com/openkmip/pykmip synced 2025-12-18 09:13:46 +00:00

Adding server support for the Activate operation

This change adds support for the Activate operation to the server,
including additional server unit tests, a new IllegalOperation
exception, and updated state attribute support in Pie objects.

Fixes #186
This commit is contained in:
Peter Hamilton
2016-08-28 12:39:00 -04:00
parent 2a7c45e97a
commit b7cc542d9a
4 changed files with 255 additions and 1 deletions

View File

@@ -159,6 +159,7 @@ class CryptographicObject(ManagedObject):
primary_key=True)
cryptographic_usage_masks = Column('cryptographic_usage_mask',
sql.UsageMaskType)
state = Column('state', sql.EnumType(enums.State))
__mapper_args__ = {
'polymorphic_identity': 'CryptographicObject'
}
@@ -175,6 +176,7 @@ class CryptographicObject(ManagedObject):
super(CryptographicObject, self).__init__()
self.cryptographic_usage_masks = list()
self.state = enums.State.PRE_ACTIVE
# All remaining attributes are not considered part of the public API
# and are subject to change.
@@ -191,7 +193,6 @@ class CryptographicObject(ManagedObject):
self._lease_time = None
self._links = list()
self._revocation_reason = None
self._state = None
class Key(CryptographicObject):