2
0
mirror of https://github.com/openkmip/pykmip synced 2025-12-14 07:13:20 +00:00

Add InitialDate filtering support for the Locate operation

This change updates Locate operation support in the PyKMIP server,
allowing users to filter objects based on the objects InitialDate
attribute value. Specifying a single InitialDate attribute in the
Locate request will perform an exact match on objects; specifying
two InitialDate attributes will perform a ranged match. 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 InitialDate filtering. Simply use the "--initial-date"
flag to provide one or more InitialDate values to the Locate
script to filter on those dates.
This commit is contained in:
Peter Hamilton
2019-07-26 12:38:02 -04:00
committed by Peter Hamilton
parent ee037408cf
commit da284e932b
7 changed files with 839 additions and 156 deletions

View File

@@ -238,6 +238,20 @@ def build_cli_parser(operation=None):
default=None,
dest="name",
help="Name of secret to retrieve from the KMIP server")
parser.add_option(
"--initial-date",
action="append",
type="str",
default=[],
dest="initial_dates",
help=(
"Initial date(s) in UTC of the secret to retrieve from the "
"KMIP server. Use once to perform an exact date match. Use "
"twice to create a date range that the secret's date should "
"be within. The value format should look like this: "
"'Tue Jul 23 18:39:01 2019'"
)
)
elif operation is Operation.REGISTER:
parser.add_option(
"-f",