community.general icon indicating copy to clipboard operation
community.general copied to clipboard

Update tss.py

Open vsnine opened this issue 3 years ago • 14 comments

Add ability to provide a comment when requesting a secret as detailed in the API. https://docs.thycotic.com/ss/11.1.0/release-notes/ss-rn-11-1-000006.md#api_automatic_checkout

SUMMARY

Add an optional field "comment" which enables the use of comments when viewing a secret, which is required by some deployments of SecretServer

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

community.general/plugins/lookup/tss.py

ADDITIONAL INFORMATION

vsnine avatar Feb 23 '22 20:02 vsnine

cc @amigus @endlesstrax click here for bot help

ansibullbot avatar Feb 23 '22 20:02 ansibullbot

The test ansible-test sanity --test pep8 [explain] failed with 1 error:

plugins/lookup/tss.py:292:42: E231: missing whitespace after ':'

The test ansible-test sanity --test pep8 [explain] failed with 1 error:

plugins/lookup/tss.py:292:42: E231: missing whitespace after ':'

The test ansible-test sanity --test pep8 [explain] failed with 1 error:

plugins/lookup/tss.py:292:42: E231: missing whitespace after ':'

The test ansible-test sanity --test pep8 [explain] failed with 1 error:

plugins/lookup/tss.py:292:42: E231: missing whitespace after ':'

The test ansible-test sanity --test pep8 [explain] failed with 1 error:

plugins/lookup/tss.py:292:42: E231: missing whitespace after ':'

click here for bot help

ansibullbot avatar Feb 23 '22 21:02 ansibullbot

Looks like the test file needs to be updated. Admittedly I am not very familiar with this.

It also seems like some logic would be needed to abort if the python-tss-sdk library is too old, like in https://github.com/ansible-collections/community.general/blob/715aca4a3f86731d3edf40826c4a33d40538a7ad/plugins/lookup/tss.py#L231

I will research and submit the additional commits soon.

vsnine avatar Feb 23 '22 21:02 vsnine

Thank you @vsnine for your issue and PR. This is a great addition.

I think you're right, we need to add a check to ensure they have v1.1.0+ of the SDK installed if they are trying to pass any query parm. And also a unit test would be helpful. Otherwise I'm very happy to add this to the plugin 😁.

EndlessTrax avatar Feb 28 '22 18:02 EndlessTrax

What's the current state on this? Does this need more updates (if yes: what exactly?), or can it be merged as-is?

felixfontein avatar Mar 08 '22 06:03 felixfontein

@felixfontein It needs some changes, see my comment above. A unit test should be added for the new functionality as well as a check on the SDK version the user has if they try to add a comment.

EndlessTrax avatar Mar 08 '22 16:03 EndlessTrax

@vsnine can you update the PR accordingly? Thanks.

felixfontein avatar Mar 08 '22 19:03 felixfontein

needs_revision

russoz avatar Apr 02 '22 23:04 russoz

needs_info

felixfontein avatar Apr 13 '22 05:04 felixfontein

@vsnine This pullrequest is waiting for your response. Please respond or the pullrequest will be closed.

click here for bot help

ansibullbot avatar May 17 '22 17:05 ansibullbot

Sorry for the delay on this folks, I will try to get an update this week.

vsnine avatar May 18 '22 15:05 vsnine

@vsnine this PR contains the following merge commits:

  • https://github.com/ansible-collections/community.general/commit/8caf302790d7ceed3a70240a182600206e0b2ab7

Please rebase your branch to remove these commits.

click here for bot help

ansibullbot avatar May 20 '22 05:05 ansibullbot

needs_info

felixfontein avatar Jul 12 '22 09:07 felixfontein

@vsnine This pullrequest is waiting for your response. Please respond or the pullrequest will be closed.

click here for bot help

ansibullbot avatar Aug 13 '22 09:08 ansibullbot

@vsnine You have not responded to information requests in this pullrequest so we will assume it no longer affects you. If you are still interested in this, please create a new pullrequest with the requested information.

click here for bot help

ansibullbot avatar Sep 14 '22 09:09 ansibullbot