Skip to content

(MODULES-5126) Puppet4ing SQL Server #227

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

Merged
merged 3 commits into from
Jul 7, 2017
Merged

(MODULES-5126) Puppet4ing SQL Server #227

merged 3 commits into from
Jul 7, 2017

Conversation

glennsarti
Copy link
Contributor

@glennsarti glennsarti commented Jun 23, 2017

The Stdlib library from version 4.13.1 onwards is required for Puppet 4
compatibility. This commit updates the metadata.json to enforce the correct
module version.

Previously this module used a lot of validation functions from stdlib which are
now deprecated due to Puppet 4 Data types. This commit:

  • Converts all manifest type resources to use Puppet 4 Data Types
  • Removes any validation that is redundant due to using Data types
  • Removes the sqlserver_validate_on_off function as it is no longer required
  • Updates tests with different error messages due to Data Types

The sqlserver_validate_svrroles_hash function is no longer called and can be
removed. This commit removes the function and its associated tests.

The Stdlib library from version 4.13.1 onwards is required for Puppet 4
compatibility.  This commit updates the metadata.json to enforce the correct
module version.
@glennsarti glennsarti changed the title {WIP} Puppet4ing SQL Server {WIP}(MODULES-5126) Puppet4ing SQL Server Jun 30, 2017
@glennsarti
Copy link
Contributor Author

ping @HelenCampbell . This is my WIP PR for Puppet 4ing SQL Server. Would appreciate any pointers/feedback on my efforts so far.

Copy link
Contributor

@HelenCampbell HelenCampbell left a comment

Choose a reason for hiding this comment

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

Just a couple of comments, otherwise looks great!

if $trustworthy { sqlserver_validate_on_off($trustworthy) }
sqlserver_validate_range($two_digit_year_cutoff, 1753, 9999,
"Two digit year cutoff must be between 1753 and 9999, you provided ${two_digit_year_cutoff}")
if $log_filename or $log_filegrowth or $log_maxsize or $log_name or $log_size {
Copy link
Contributor

Choose a reason for hiding this comment

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

If either all or none of these need specified is there any point of doing the assertions on line 139-145 or 128-133? Instead of just catching them here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@@ -62,6 +62,7 @@ def convert_to_regexp(str)
shared_examples 'validation error' do
it {
params.merge!(additional_params)
#require 'pry'; binding.pry
Copy link
Contributor

Choose a reason for hiding this comment

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

Leftover debug

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah...still a WIP

Previously this module used a lot of validation functions from stdlib which are
now deprecated due to Puppet 4 Data types.  This commit:
- Converts all manifest type resources to use Puppet 4 Data Types
- Removes any validation that is redundant due to using Data types
- Removes the sqlserver_validate_on_off function as it is no longer required
- Updates tests with different error messages due to Data Types
The sqlserver_validate_svrroles_hash function is no longer called and can be
removed.  This commit removes the function and its associated tests.
@glennsarti glennsarti changed the title {WIP}(MODULES-5126) Puppet4ing SQL Server (MODULES-5126) Puppet4ing SQL Server Jul 6, 2017
@HelenCampbell HelenCampbell merged commit c2326b3 into puppetlabs:master Jul 7, 2017
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