Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error renewing token #397

Closed
GeiserX opened this issue Mar 1, 2019 · 1 comment
Closed

Error renewing token #397

GeiserX opened this issue Mar 1, 2019 · 1 comment
Labels
question Questions requesting clarification or guidance on hvac usage

Comments

@GeiserX
Copy link

GeiserX commented Mar 1, 2019

Hi, I have a problem while using the hvac client

First of all, thank you for making this software real!

Very simple script:

#!/usr/bin/python3
import os
import hvac

VaultURL = os.environ['VAULT_ADDR']
CurrentToken = os.environ['VAULT_TOKEN']

client = hvac.Client(url=VaultURL, token=CurrentToken)
client.sys.renew_token(CurrentToken)

I simply tried with client.sys.renew_token() also but it fails also with the same error.

Traceback (most recent call last):
  File "vault-renew-token.py", line 9, in <module>
    client.sys.renew_token(CurrentToken)
  File "/usr/local/lib/python3.5/dist-packages/hvac/api/system_backend/__init__.py", line 58, in __getattr__
    raise AttributeError

If I can provide you more info I can.

Thank you very much!

@jeffwecan
Copy link
Member

The API route you're after is currently handled by a method attached to the client class. I.e., I believe updating the client.sys.renew_token(CurrentToken) to client.renew_token(CurrentToken) would do the trick.

@jeffwecan jeffwecan added the question Questions requesting clarification or guidance on hvac usage label Mar 4, 2019
@GeiserX GeiserX closed this as completed Mar 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Questions requesting clarification or guidance on hvac usage
Projects
None yet
Development

No branches or pull requests

2 participants