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

SqlServerDatabaseMail: New resource #155

Closed
SQLHorizons opened this issue Oct 11, 2016 · 5 comments · Fixed by #145
Closed

SqlServerDatabaseMail: New resource #155

SQLHorizons opened this issue Oct 11, 2016 · 5 comments · Fixed by #145
Labels
resource proposal The issue is proposing a new resource in the resource module.

Comments

@SQLHorizons
Copy link
Contributor

xdBmail is an additional resource I've been developing to setup the default database mail profile and account during SQL roll out.

Usage - configure a default mail profile for SQL agent jobs and alerts.

@kwirkykat kwirkykat added the resource proposal The issue is proposing a new resource in the resource module. label Oct 17, 2016
@johlju
Copy link
Member

johlju commented Nov 13, 2016

This is being worked on in pr #145. It is suggested to rename this resource to 'MSFT_SqlServerDatabaseMail'

@johlju johlju added help wanted The issue is up for grabs for anyone in the community. in progress The issue is being actively worked on by someone. and removed help wanted The issue is up for grabs for anyone in the community. labels Nov 13, 2016
@johlju johlju changed the title Request resource xdBmail xSQLServerDatabaseMail: New resource Jun 22, 2017
@johlju
Copy link
Member

johlju commented Jun 22, 2017

Renamed the title of this issue, and the title of the PR #145 (which has been submitted with a proposal).

To everyone:
Is anyone interested in running with this resource and continue the work in PR #145?

Below is the proposed schema.mof as of today. Please give some feedback on this for improvements.

For example, shouldn't ReplyToAddress be a string array? And how should the resource handle enabling and disabling of database mail? When the first 'Present' configuration it will enable database mail, and when the last is removed with 'absent' it should disable database mail? Or should it be an entire new resource to enable or disable database mail, and this proposed resource only adds "profiles"?

[ClassVersion("1.0.0.0"), FriendlyName("SqlServerDatabaseMail")]
class MSFT_SqlServerDatabaseMail : OMI_BaseResource
{
    [Key, Description("None yet.")] String AccountName;
    [Key, Description("The name of the SQL instance to be configured.")] String SQLInstanceName;
    [Required, Description("None yet.")] String EmailAddress;
    [Required, Description("None yet.")] String MailServerName;
    [Required, Description("None yet.")] String ProfileName;
    [Write, Description("An enumerated value that describes if the database mail configuration should be added ('Present') or removed ('Absent'). Default value is 'Present'."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure;
    [Write, Description("The host name of the SQL Server to be configured.")] String SQLServer;
    [Write, Description("None yet. Default value is the same value assigned to parameter SQLServer.")] String DisplayName;
    [Write, Description("None yet. Default value is the same e-mail address assigned to parameter EmailAddress.")] String ReplyToAddress;
    [Write, Description("None yet. Default value is 'Mail account to send alerts for the DBAs'.")] String Description;
    [Write, Description("Type of mail server. Currently the only option is 'SMTP'. Default value is 'SMTP'."), ValueMap{"SMTP"}, Values{"SMTP"}] String MailServerType;
    [Write, Description("The TCP port used for communication. Default value is 25 (TCP port 25).")] UInt16 Port;
};

@johlju johlju changed the title xSQLServerDatabaseMail: New resource SqlDatabaseMail: New resource Dec 24, 2017
@johlju johlju changed the title SqlDatabaseMail: New resource SqlServerDatabaseMail: New resource Dec 24, 2017
@johlju
Copy link
Member

johlju commented Dec 27, 2017

@randomnote1 and @nabrond Is SqlServerDatabaseMail the best and correct name for this resource, or should we change it? The feature is called 'Database Mail' (?). So it might be that SqlServerDatabaseMail is best and correct name. What do you guys think? I'm I thinking correctly below.

<Module Identifier>[<Component>][<Action>]<Scope>{<Feature>|<Property>}

Module Identifier: Sql
Component:: -
Action: -
Scope: Server
Feature: DatabaseMail

Name: SqlServerDatabaseMail

PR moving closer to the finish line, I should fix code for 'Absent' and make it localized, after that I think we can merge the resource, so it can be improved later on. Basic stuff works (the parameters suggested in this issue).

@randomnote1
Copy link
Contributor

@johlju, I think that looks right. I had to re-read the guidelines to make sure.

@johlju
Copy link
Member

johlju commented Dec 27, 2017

@randomnote1 Thanks!

@johlju johlju removed the in progress The issue is being actively worked on by someone. label Jan 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resource proposal The issue is proposing a new resource in the resource module.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants