Skip to content

Commit

Permalink
rename to getSecretAndMetadata
Browse files Browse the repository at this point in the history
  • Loading branch information
kiran committed Feb 8, 2022
1 parent 09aece1 commit df06772
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions credstash.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ def getSecretAction(args, region, kms_region, **session_params):
output_args = {}
sys.stdout.write(output_func(secrets, **output_args))
else:
sys.stdout.write(getSecret(
sys.stdout.write(getSecretAndMetadata(
args.credential,
version=args.version,
region=region,
Expand All @@ -554,15 +554,15 @@ def getSecret(name, version="", region=None, table="credential-store", context=N
'''
fetch and decrypt the secret called `name`
'''
secret, context = getSecretAndContext(name=name, version=version, region=region,
secret, context = getSecretAndMetadata(name=name, version=version, region=region,
table=table, context=context, dynamodb=dynamodb,
kms=kms, **kwargs)
kms=kms, kms_region=kms_region, **kwargs)
return secret


def getSecretAndContext(name, version="", region=None,
def getSecretAndMetadata(name, version="", region=None,
table="credential-store", context=None,
dynamodb=None, kms=None, **kwargs):
dynamodb=None, kms=None, kms_region=None, **kwargs):
"""
fetch and decrypt the secret called `name`, and also return its version and
comments.
Expand Down

0 comments on commit df06772

Please sign in to comment.