Repair some demos

Pass the required argument to the `build_cli_parser` function where
it was missed. Pass the missed argument in the `objects.SecretData`
initialization.
This commit is contained in:
Konstantin Trushin 2022-05-08 21:20:53 +03:00 committed by arp102
parent 69b127c24d
commit 4d1e9c633c
6 changed files with 7 additions and 7 deletions

View File

@ -26,7 +26,7 @@ from kmip.pie import objects
if __name__ == '__main__':
logger = utils.build_console_logger(logging.INFO)
parser = utils.build_cli_parser()
parser = utils.build_cli_parser(enums.Operation.REGISTER)
opts, args = parser.parse_args(sys.argv[1:])
config = opts.config

View File

@ -26,7 +26,7 @@ from kmip.pie import objects
if __name__ == '__main__':
logger = utils.build_console_logger(logging.INFO)
parser = utils.build_cli_parser()
parser = utils.build_cli_parser(enums.Operation.REGISTER)
opts, args = parser.parse_args(sys.argv[1:])
config = opts.config

View File

@ -26,7 +26,7 @@ from kmip.pie import objects
if __name__ == '__main__':
logger = utils.build_console_logger(logging.INFO)
parser = utils.build_cli_parser()
parser = utils.build_cli_parser(enums.Operation.REGISTER)
opts, args = parser.parse_args(sys.argv[1:])
config = opts.config

View File

@ -26,7 +26,7 @@ from kmip.pie import objects
if __name__ == '__main__':
logger = utils.build_console_logger(logging.INFO)
parser = utils.build_cli_parser()
parser = utils.build_cli_parser(enums.Operation.REGISTER)
opts, args = parser.parse_args(sys.argv[1:])
config = opts.config

View File

@ -27,7 +27,7 @@ from kmip.pie import objects
if __name__ == '__main__':
logger = utils.build_console_logger(logging.INFO)
parser = utils.build_cli_parser()
parser = utils.build_cli_parser(enums.Operation.REGISTER)
opts, args = parser.parse_args(sys.argv[1:])
config = opts.config
@ -37,7 +37,7 @@ if __name__ == '__main__':
usage_mask = [enums.CryptographicUsageMask.VERIFY]
name = 'Demo Secret Data'
secret = objects.SecretData(value, data_type, usage_mask, name)
secret = objects.SecretData(value, data_type, None, usage_mask, name)
secret.operation_policy_name = opts.operation_policy_name
# Build the client and connect to the server

View File

@ -26,7 +26,7 @@ from kmip.pie import objects
if __name__ == '__main__':
logger = utils.build_console_logger(logging.INFO)
parser = utils.build_cli_parser()
parser = utils.build_cli_parser(enums.Operation.REGISTER)
opts, args = parser.parse_args(sys.argv[1:])
config = opts.config