Rename Function to Merge-DSCConfigurationData
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
Description = "Merges DSC configuration data from templates and deployment data."
|
Description = "Merges DSC configuration data from templates and deployment data."
|
||||||
PowerShellVersion = "5.1"
|
PowerShellVersion = "5.1"
|
||||||
FunctionsToExport = @(
|
FunctionsToExport = @(
|
||||||
"Merge-ConfigurationData"
|
"Merge-DSCConfigurationData"
|
||||||
)
|
)
|
||||||
CmdletsToExport = @()
|
CmdletsToExport = @()
|
||||||
VariablesToExport = @()
|
VariablesToExport = @()
|
||||||
|
|||||||
@@ -9,5 +9,5 @@ foreach($File in @($Private + $Public)){
|
|||||||
}
|
}
|
||||||
|
|
||||||
Export-ModuleMember -Function @(
|
Export-ModuleMember -Function @(
|
||||||
"Merge-ConfigurationData"
|
"Merge-DSCConfigurationData"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
function Merge-ConfigurationData {
|
function Merge-DSCConfigurationData {
|
||||||
[CmdletBinding()]
|
[CmdletBinding()]
|
||||||
Param(
|
Param(
|
||||||
[Parameter(Mandatory=$true)]
|
[Parameter(Mandatory=$true)]
|
||||||
@@ -21,7 +21,7 @@ function Merge-ConfigurationData {
|
|||||||
Write-Verbose "Key [$($Property.Name)] is a Hashtable"
|
Write-Verbose "Key [$($Property.Name)] is a Hashtable"
|
||||||
if($null -ne $Deployment.$($Property.Name)){
|
if($null -ne $Deployment.$($Property.Name)){
|
||||||
Write-Verbose "Key [$($Property.Name)] is present in Deployment Data"
|
Write-Verbose "Key [$($Property.Name)] is present in Deployment Data"
|
||||||
$Output.($Property.Name) = Merge-ConfigurationData -Template $Template.$($Property.Name) -Deployment $Deployment.$($Property.Name) -Output $Output.$($Property.Name)
|
$Output.($Property.Name) = Merge-DSCConfigurationData -Template $Template.$($Property.Name) -Deployment $Deployment.$($Property.Name) -Output $Output.$($Property.Name)
|
||||||
}else{
|
}else{
|
||||||
Write-Verbose "Key [$($Property.Name)] is not present in Deployment Data"
|
Write-Verbose "Key [$($Property.Name)] is not present in Deployment Data"
|
||||||
$Output.Add($($Property.Name),(Copy-ConfigurationDataValue -Value $Template.$($Property.Name)))
|
$Output.Add($($Property.Name),(Copy-ConfigurationDataValue -Value $Template.$($Property.Name)))
|
||||||
@@ -30,7 +30,7 @@ function Merge-ConfigurationData {
|
|||||||
Write-Verbose "Key [$($Property.Name)] is a Ordered Dictionary"
|
Write-Verbose "Key [$($Property.Name)] is a Ordered Dictionary"
|
||||||
if($null -ne $Deployment.$($Property.Name)){
|
if($null -ne $Deployment.$($Property.Name)){
|
||||||
Write-Verbose "Key [$($Property.Name)] is present in Deployment Data"
|
Write-Verbose "Key [$($Property.Name)] is present in Deployment Data"
|
||||||
$Output.($Property.Name) = Merge-ConfigurationData -Template $Template.$($Property.Name) -Deployment $Deployment.$($Property.Name) -Output $Output.$($Property.Name)
|
$Output.($Property.Name) = Merge-DSCConfigurationData -Template $Template.$($Property.Name) -Deployment $Deployment.$($Property.Name) -Output $Output.$($Property.Name)
|
||||||
}else{
|
}else{
|
||||||
Write-Verbose "Key [$($Property.Name)] is not present in Deployment Data"
|
Write-Verbose "Key [$($Property.Name)] is not present in Deployment Data"
|
||||||
$Output.Add($($Property.Name),(Copy-ConfigurationDataValue -Value $Template.$($Property.Name)))
|
$Output.Add($($Property.Name),(Copy-ConfigurationDataValue -Value $Template.$($Property.Name)))
|
||||||
@@ -71,7 +71,7 @@ function Merge-ConfigurationData {
|
|||||||
if($MatchingDeploymentItems.Count -gt 0){
|
if($MatchingDeploymentItems.Count -gt 0){
|
||||||
foreach($DeploymentItem in $MatchingDeploymentItems){
|
foreach($DeploymentItem in $MatchingDeploymentItems){
|
||||||
$OutputItem = @($Output.$($Property.Name) | Where-Object { Test-ConfigurationDataItemKeyMatch -Left $_ -Right $DeploymentItem -KeyNames $SearchKeyNames })[0]
|
$OutputItem = @($Output.$($Property.Name) | Where-Object { Test-ConfigurationDataItemKeyMatch -Left $_ -Right $DeploymentItem -KeyNames $SearchKeyNames })[0]
|
||||||
Merge-ConfigurationData -Template $TemplateItem.Value -Deployment $DeploymentItem -Output $OutputItem | Out-Null
|
Merge-DSCConfigurationData -Template $TemplateItem.Value -Deployment $DeploymentItem -Output $OutputItem | Out-Null
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
if($TemplateItem.IsWildcard){
|
if($TemplateItem.IsWildcard){
|
||||||
Reference in New Issue
Block a user