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

ENH: Email users on a HV workflow #262

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

ENH: Email users on a HV workflow #262

wants to merge 5 commits into from

Conversation

gmatthews20
Copy link
Collaborator

Description:

Add workflow for emailing users on a given hypervisor, test temporary email template. Tests for the new workflow

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?

Server properties previously using host id as hv id however hosts are different to hvs
Action takes a hv name and sends email to users with VMs on that hv
Test email templates
Test for sending hv emails workflow
@gmatthews20 gmatthews20 changed the title Hv notify ENH: Email users on a HV workflow Sep 26, 2024
Update tests to change server property from HYPERVISOR_ID to HYPERVISOR_NAME
@@ -0,0 +1,9 @@
Dear Cloud User {{username}}, <br/><br/>

Test email about servers on hv <br/><br/><br/>
Copy link
Collaborator

Choose a reason for hiding this comment

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

@jacob-ward @DavidFair - What should the email template be here? Worth getting this nailed down before merging this into Prod

lib/email_api/email_template_schemas.yaml Outdated Show resolved Hide resolved
lib/enums/query/props/server_properties.py Outdated Show resolved Hide resolved
lib/workflows/send_hv_email.py Show resolved Hide resolved
Copy link

codecov bot commented Sep 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.25%. Comparing base (2468e98) to head (8599ef9).
Report is 59 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #262      +/-   ##
==========================================
+ Coverage   98.20%   98.25%   +0.05%     
==========================================
  Files         195      197       +2     
  Lines        7636     7860     +224     
  Branches      460      468       +8     
==========================================
+ Hits         7499     7723     +224     
  Misses        110      110              
  Partials       27       27              

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

Update docs and actions using server properties to use hypervisor name instead of hypervisor id
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.

2 participants