-
Notifications
You must be signed in to change notification settings - Fork 157
Description
StorageStatusMask is defined in enums.py.
The documentation tells, that this has to be an integer.
However, when I try a locate and set the storage_status_mask to enums.StorageStatusMask.ONLINE_STORAGE.value
the server throws the follwinging error:
======================
2025-08-11 09:58:45,344 - kmip.services.kmip_server - ERROR - KMIPServer <type 'exceptions.TypeError'> read() takes exactly 2 arguments (1 given)
Traceback (most recent call last):
File "/root/cayman_pykmip/pykmip/src/kmip/services/kmip_server.py", line 82, in serve_connection
self._processor.process(protocol, protocol)
File "/root/cayman_pykmip/pykmip/src/kmip/services/processor.py", line 85, in process
message.read(stream)
File "/root/cayman_pykmip/pykmip/src/kmip/core/messages/messages.py", line 353, in read
batch_item.read(istream)
File "/root/cayman_pykmip/pykmip/src/kmip/core/messages/messages.py", line 204, in read
self.request_payload.read(tstream)
File "/root/cayman_pykmip/pykmip/src/kmip/core/messages/payloads/locate.py", line 69, in read
self.storage_status_mask.read()
TypeError: read() takes exactly 2 arguments (1 given)
My request was
from kmip.pie import client
from kmip.pie import objects
from kmip.core import enums
from kmip.core import primitives
from kmip.core.factories import attributes
from kmip.core.primitives import Enumerationf = attributes.AttributeFactory()
c = client.ProxyKmipClient()with c:
... c.locate(
... storage_status_mask = enums.StorageStatusMask.ONLINE_STORAGE.value
... ,
... attributes=[
... f.create_attribute(
... enums.AttributeType.OBJECT_TYPE,
... enums.ObjectType.SYMMETRIC_KEY,
... ),
...
... ]
... )