-
Notifications
You must be signed in to change notification settings - Fork 155
Description
KMIP protocol supports batching operations, for example to execute the sequence locate/check/get in a single request. Is request batching supported by PyKMIP? I did not find any mention of this either way in the documentation. I see in KMIPProxy there is some support for batching but it is not clear if it works. For instance create_key_pair
has a boolean batch parameter, which if true appends the batch item to self.batch_items
instead of sending it immediately. But I can't find any way of causing the client to send these items in a batch.
It seems like (if batching were supported) KMIPProxy would have batch params on all of its functions, and each would do something like this:
batch_item = self._build_xxx_batch_item(...)
self.batch_items.append(batch_item)
if batch == True:
return
request = self._build_request_message(credential, self.batch_items)
self.batch_items = []
response = self._send_and_receive_message(request)
So that if you called several functions with batch=True they would be stored and then when the final command with batch=False is issued all of the previously batched commands are also sent for execution.
Is this totally off base? Maybe batching is supported and I am just misunderstanding something about how it works in PyKMIP? Any hints most appreciated.