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

added folder lookup #55

Merged
merged 2 commits into from
Jul 3, 2024
Merged

added folder lookup #55

merged 2 commits into from
Jul 3, 2024

Conversation

SimHeb
Copy link

@SimHeb SimHeb commented Jun 12, 2024

Added the following functions

  1. get_folder --> gets a folder by ID, can get_all_children=True if needed
  2. get_folder_by_path --> gets a folder by a given folder_path, can get_all_children=True if needed
  3. lookup_folders and get_folder_json are helper functions created according the get_secret_json respectively.
  4. get_child_folder_ids_by_folderid --> gets a list of child folder IDs from a given folder IDs. limitToDirectDescendents is set to true to only get the actual child folders, to prevent bigger JSON loads.
  5. Added a SecretFolder DataClass which represents a folder struct in python
    All functions have been tested with pytest.

@tylerezimmerman
Copy link
Contributor

@SimHeb thanks for the contribution! We are looking into getting the test failures resolved.

@delinea-rajani
Copy link
Contributor

delinea-rajani commented Jun 13, 2024

@SimHeb
Following steps will resolve the test failures.

  1. You need to add TSS_FOLDER_PATH under passenv in the tox.ini file.
    image

  2. Add all environment variables by navigating to:
    GitHub => Settings => Actions => Repository Secrets => New repository secret, in your branch SimHeb:main because test cases are running on your repository.
    image

@SimHeb
Copy link
Author

SimHeb commented Jun 13, 2024

Hey @delinea-rajani,

Thank you very much for your fast response. Unfortunately I am unable to test this without further changes, since we do not have a cloud secret server instance on hand.

@tylerezimmerman tylerezimmerman merged commit 4056e1c into DelineaXPM:main Jul 3, 2024
2 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants