mirror of
https://github.com/openkmip/pykmip
synced 2025-12-21 10:43:15 +00:00
Update the ProtocolVersion implementation
This change updates the implementation of the ProtocolVersion struct, bringing it inline with the current struct style. All uses of the struct have been updated to reflect these changes, as have the struct unit tests.
This commit is contained in:
@@ -105,9 +105,9 @@ class KmipEngine(object):
|
||||
self._id_placeholder = None
|
||||
|
||||
self._protocol_versions = [
|
||||
contents.ProtocolVersion.create(1, 2),
|
||||
contents.ProtocolVersion.create(1, 1),
|
||||
contents.ProtocolVersion.create(1, 0)
|
||||
contents.ProtocolVersion(1, 2),
|
||||
contents.ProtocolVersion(1, 1),
|
||||
contents.ProtocolVersion(1, 0)
|
||||
]
|
||||
|
||||
self._protocol_version = self._protocol_versions[0]
|
||||
@@ -2001,11 +2001,11 @@ class KmipEngine(object):
|
||||
contents.Operation(enums.Operation.QUERY)
|
||||
])
|
||||
|
||||
if self._protocol_version >= contents.ProtocolVersion.create(1, 1):
|
||||
if self._protocol_version >= contents.ProtocolVersion(1, 1):
|
||||
operations.extend([
|
||||
contents.Operation(enums.Operation.DISCOVER_VERSIONS)
|
||||
])
|
||||
if self._protocol_version >= contents.ProtocolVersion.create(1, 2):
|
||||
if self._protocol_version >= contents.ProtocolVersion(1, 2):
|
||||
operations.extend([
|
||||
contents.Operation(enums.Operation.ENCRYPT),
|
||||
contents.Operation(enums.Operation.DECRYPT),
|
||||
|
||||
Reference in New Issue
Block a user