-
Notifications
You must be signed in to change notification settings - Fork 2
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
Smtp integration #32
base: main
Are you sure you want to change the base?
Smtp integration #32
Conversation
The validated Authentication type. | ||
""" | ||
if auth_type == AuthType.NONE: | ||
return None |
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.
I do not understand what we are doing in here?
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.
If we don't do this we have to check for it when generating environment variables from it. I think handling this in here is the cleanest way so we don't have to import this class into other places in the code.
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.
If we don't turn it into None, we either create a env variable with the value none
or we check the auth_type
to see if its not none
then create the enb variable
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.
Had discussion with Greg about this. This is more like a property so I will make this a property and set it None
when auth_type
is string none
Test results for commit acc491cTest coverage for acc491c
Static code analysis report
|
Overview
Add SMTP integration to 12 Factor apps.
Rationale
User story:
As a user, I need to email my clients for application notifications. I would need SMTP credentials to add email integration to my app so that I can send emails to my clients using the credentials.
Juju Events Changes
Observe
smtp_data_available
event.Module Changes
Add 3 new classes to store SMTP credentials.
These classes are copied from smtp library to store smtp credentials correctly.
Add new attribute
smtp_parameters
toIntegrationsState
class to store aSmtpParameters
instance.Add new function
_init_smtp
inPaasCharm
class to handle smtp integration initialization.Add a couple of unit tests for all frameworks.
Checklist
src-docs
urgent
,trivial
,complex
)