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

Add user query #89

Merged
merged 18 commits into from
Aug 3, 2023
Merged

Conversation

meoflynn
Copy link
Collaborator

Description:

Special Notes:


Submitter:

Have you (where applicable):

  • Added unit tests?
  • Checked the latest commit runs on Dev?
  • Updated the example config file(s) and README?

Reviewer

Does this PR:

  • Place non-StackStorm code into the lib directory?
  • Have unit tests for the action/sensor and lib layers?
  • Have clear and obvious action parameter names and descriptions?

@meoflynn meoflynn added the enhancement New feature or request label Jul 31, 2023
@meoflynn meoflynn force-pushed the openstack-query/user-queries branch from cb09196 to cb7d614 Compare August 1, 2023 12:51
Correct unit test for query manager
Add method of parse subset and unit test for user_runner
Fixes done based on errors raised by unit tests for user query
@meoflynn meoflynn force-pushed the openstack-query/user-queries branch from cb7d614 to 10993dc Compare August 1, 2023 13:00
@meoflynn meoflynn force-pushed the openstack-query/user-queries branch 3 times, most recently from 0fca5f8 to b4d463c Compare August 2, 2023 12:46
@meoflynn meoflynn force-pushed the openstack-query/user-queries branch from b4d463c to 1204d93 Compare August 2, 2023 13:07
fixed some failing tests
also fixed some filepaths which were causing errors
@codecov
Copy link

codecov bot commented Aug 2, 2023

Codecov Report

Patch coverage: 94.53% and project coverage change: -0.04% ⚠️

Comparison is base (dbd79ea) 94.43% compared to head (eb4bebb) 94.40%.
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #89      +/-   ##
==========================================
- Coverage   94.43%   94.40%   -0.04%     
==========================================
  Files          89       95       +6     
  Lines        2248     2342      +94     
  Branches      222      232      +10     
==========================================
+ Hits         2123     2211      +88     
- Misses        111      114       +3     
- Partials       14       17       +3     
Files Changed Coverage Δ
lib/openstack_query/managers/server_manager.py 92.30% <0.00%> (-4.47%) ⬇️
lib/enums/query/props/user_properties.py 85.71% <85.71%> (ø)
lib/structs/query/query_output_details.py 94.11% <87.50%> (-5.89%) ⬇️
lib/openstack_query/queries/user_query.py 89.47% <89.47%> (ø)
lib/openstack_query/managers/query_manager.py 95.55% <95.65%> (-0.28%) ⬇️
actions/src/user_query_actions.py 100.00% <100.00%> (ø)
lib/enums/user_domains.py 100.00% <100.00%> (ø)
lib/exceptions/enum_mapping_error.py 100.00% <100.00%> (ø)
lib/exceptions/query_preset_mapping_error.py 100.00% <100.00%> (ø)
lib/exceptions/query_property_mapping_error.py 100.00% <100.00%> (ø)
... and 4 more

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@anish-mudaraddi
Copy link
Collaborator

anish-mudaraddi commented Aug 3, 2023

The StackStorm Actions we added user.search.by.property and user.search.by.regex both only allow searching for stfc domain users - I think another PR needs to be made to add selecting of domain - since it involves making a generic change to the Manager API which will affect all Managers.

@meoflynn meoflynn marked this pull request as ready for review August 3, 2023 10:29
Copy link
Collaborator

@anish-mudaraddi anish-mudaraddi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

me and @meoflynn pair programmed this together and we're both happy with this

@anish-mudaraddi anish-mudaraddi merged commit 0e7bc6d into stfc:main Aug 3, 2023
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants