-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
onepassword_doc: fix 1Password Connect support #9625
base: main
Are you sure you want to change the base?
onepassword_doc: fix 1Password Connect support #9625
Conversation
169e6d3
to
cb0a9eb
Compare
This is a good short term solution. Longer term, it would be nice to have a better and cleaner interface for specifying just the particular command that needs running instead of each plugin having to override Maybe it's as simple as making I like the model of plugins for different types calling |
@@ -582,6 +580,10 @@ def get_raw(self, item_id, vault=None, token=None): | |||
|
|||
return self._run(args) | |||
|
|||
def get_raw(self, item_id, vault=None, token=None): | |||
args = ["item", "get", item_id, "--format", "json"] | |||
return self._add_parameters_and_run(args, vault=vault, token=token) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another approach could be moving this to a new _run()
method on the OnePassCLIv2
class.
Indeed. This is only meant as a short-term solution that can be backported without a larger refactoring. There's more work to do - the shared code should also better be moved to plugin_utils or module_utils, etc. |
SUMMARY
It seems that when #7116 and #7490 were merged, onepassword_doc.py ended up with the CLI parameters from
OnePassCLIv2.get_raw()
before 1Password Connect support was merged for onepassword.py. I'm not 100% sure all these parameters work with docs as well, but I think it's better to move adding these parameters to a separate function so it can be used from other derivatives ofOnePassCLIv2
.@samdoran would be great if you could take a look :)
ISSUE TYPE
COMPONENT NAME
onepassword_doc