-
Notifications
You must be signed in to change notification settings - Fork 59
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
Can't set keyword path
in data
#389
Comments
@briantist replying to your message here. We can base the new code on :
import pkg_resources
pkg_resources.get_distribution('hvac').version python 3.8 >= from importlib.metadata import version
version('hvac') |
I think I prefer to use the method we use in other areas of the code where we try to use the desired method, and then fall back, so it'd be something like: try:
client.write_data(...)
except (NotImplementedError, AttributeError):
self.warn("blah blah")
client.write(...) See for example:
In this case it'll be slightly different because the It's also a different situation because eventually, the code will change back to preferring Since our CI can't currently use multiple |
Maybe something like this is better, I think we don't need to warn people that don't use 'path' or 'wrap_ttl' ? try:
client.write_data(data)
except (NotImplementedError, AttributeError):
if "path" in data or "wrap_ttl" in data:
raise_from(
AnsibleError("To support 'path' and 'wrap_ttl' key in 'data' parameter you must have hvac >= 1.2"),
HashiVaultValueError
)
else:
client.write(data) |
That seems reasonable, yeah! |
SUMMARY
We can't set
path
key indata
, for example to configure ACME path in PKI plugin.The issue is in hvac library see hvac/hvac#133
I've opened this issue to track it and add a fix when hvac will fix the issue
ISSUE TYPE
COMPONENT NAME
ANSIBLE VERSION
COLLECTION VERSION
STEPS TO REPRODUCE
EXPECTED RESULTS
Update
path
value ofpki/config/cluster
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: