mirror of
https://github.com/openkmip/pykmip
synced 2025-12-16 00:04:26 +00:00
Add offset and maximum item filtering for the Locate operation
This change updates Locate operation support in the PyKMIP server, allowing users to filter objects using the offset and maximum item constraints. The offset constraint tells the server how many matching items should be skipped before results are returned. The maximum items constraint tells the server how many matching items should be returned. Unit tests and integration tests have been added to test and verify the correctness of this feature. Additionally, the Locate demo scripts have also been updated to support offset and maximum item filtering. Simply use the "--offset-items" and "--maximum-items" flags to specify offset and maximum item values for the Locate script to filter on. Fixes #562
This commit is contained in:
committed by
Peter Hamilton
parent
4938f82772
commit
4a6a2eccc1
@@ -230,6 +230,22 @@ def build_cli_parser(operation=None):
|
||||
help="List of attribute names to retrieve, defaults to all "
|
||||
"attributes")
|
||||
elif operation is Operation.LOCATE:
|
||||
parser.add_option(
|
||||
"--offset-items",
|
||||
action="store",
|
||||
type="int",
|
||||
default=None,
|
||||
dest="offset_items",
|
||||
help="The number of matching secrets to skip."
|
||||
)
|
||||
parser.add_option(
|
||||
"--maximum-items",
|
||||
action="store",
|
||||
type="int",
|
||||
default=None,
|
||||
dest="maximum_items",
|
||||
help="The maximum number of matching secrets to return."
|
||||
)
|
||||
parser.add_option(
|
||||
"-n",
|
||||
"--name",
|
||||
|
||||
Reference in New Issue
Block a user