Skip to content

Commit 32a62f9

Browse files
committed
(MODULES-8193) - Removal of inbuilt deepmerge and dirname functions
Both functions have been removed from the code and their function calls within the manifest's updated as they already exist within puppet itself, in the case of deepmerge and within stdlib in the case of dirname.
1 parent ecce0b3 commit 32a62f9

File tree

10 files changed

+6
-284
lines changed

10 files changed

+6
-284
lines changed

Diff for: lib/puppet/functions/mysql/deepmerge.rb

-66
This file was deleted.

Diff for: lib/puppet/functions/mysql/dirname.rb

-20
This file was deleted.

Diff for: lib/puppet/parser/functions/mysql_deepmerge.rb

-58
This file was deleted.

Diff for: lib/puppet/parser/functions/mysql_dirname.rb

-21
This file was deleted.

Diff for: manifests/backup/mysqlbackup.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
'password' => $backuppassword,
9393
}
9494
}
95-
$options = mysql::deepmerge($default_options, $mysql::server::override_options)
95+
$options = $default_options.deep_merge($mysql::server::override_options)
9696

9797
file { 'mysqlbackup-config-file':
9898
path => '/etc/mysql/conf.d/meb.cnf',

Diff for: manifests/server.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
}
117117

118118
# Create a merged together set of options. Rightmost hashes win over left.
119-
$options = mysql::deepmerge($mysql::params::default_options, $override_options)
119+
$options = $mysql::params::default_options.deep_merge($override_options)
120120

121121
Class['mysql::server::root_password'] -> Mysql::Db <| |>
122122

Diff for: manifests/server/binarylog.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
$logbin = pick($options['mysqld']['log-bin'], $options['mysqld']['log_bin'], false)
1212

1313
if $logbin {
14-
$logbindir = mysql::dirname($logbin)
14+
$logbindir = dirname($logbin)
1515

1616
#Stop puppet from managing directory if just a filename/prefix is specified
1717
if $logbindir != '.' {

Diff for: manifests/server/config.pp

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
# on some systems this is /etc/my.cnf.d, while Debian has /etc/mysql/conf.d and FreeBSD something in /usr/local. For the latter systems,
2626
# managing this basedir is also required, to have it available before the package is installed.
27-
$includeparentdir = mysql::dirname($includedir)
27+
$includeparentdir = dirname($includedir)
2828
if $includeparentdir != '/' and $includeparentdir != '/etc' {
2929
file { $includeparentdir:
3030
ensure => directory,
@@ -43,9 +43,9 @@
4343

4444
# on mariadb systems, $includedir is not defined, but /etc/my.cnf.d has
4545
# to be managed to place the server.cnf there
46-
$configparentdir = mysql::dirname($mysql::server::config_file)
46+
$configparentdir = dirname($mysql::server::config_file)
4747
if $configparentdir != '/' and $configparentdir != '/etc' and $configparentdir
48-
!= $includedir and $configparentdir != mysql::dirname($includedir) {
48+
!= $includedir and $configparentdir != dirname($includedir) {
4949
file { $configparentdir:
5050
ensure => directory,
5151
mode => '0755',

Diff for: spec/functions/mysql_deepmerge_spec.rb

-94
This file was deleted.

Diff for: spec/functions/mysql_dirname_spec.rb

-19
This file was deleted.

0 commit comments

Comments
 (0)