Updates to SaltStackConfig module

Updates to function names and parameters to ensure consistency as discussed in PR 543.

Signed-off-by: Brian Wuchner <brian.wuchner@gmail.com>
This commit is contained in:
Brian Wuchner
2022-02-23 15:32:31 -05:00
parent b9cdded704
commit 02fd75b6a1
2 changed files with 11 additions and 7 deletions

View File

@@ -17,7 +17,7 @@ SPDX-License-Identifier: BSD-2-Clause
RootModule = 'SaltStackConfig.psm1' RootModule = 'SaltStackConfig.psm1'
# Version number of this module. # Version number of this module.
ModuleVersion = '0.0.7' ModuleVersion = '0.0.8'
# Supported PSEditions # Supported PSEditions
# CompatiblePSEditions = @() # CompatiblePSEditions = @()
@@ -75,8 +75,8 @@ FormatsToProcess = @('SaltStackConfig.Format.ps1xml')
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
FunctionsToExport = @('Connect-SscServer', 'Disconnect-SscServer', 'Get-SscActivity', 'Get-SscData', 'Get-SscJob', 'Get-SscMaster', 'Get-SscMinionCache', 'Get-SscReturn', FunctionsToExport = @('Connect-SscServer', 'Disconnect-SscServer', 'Get-SscActivity', 'Get-SscData', 'Get-SscJob', 'Get-SscMaster', 'Get-SscMinionCache', 'Get-SscReturn',
'Get-SscSchedule','Get-SscFile','Set-SscFile','New-SscFile','Remove-SscFile','Get-SscLicense','Get-SscvRALicense','Get-SscMinionKeyState','Set-SscMinionKeyState', 'Get-SscSchedule','Get-SscFile','Set-SscFile','New-SscFile','Remove-SscFile','Get-SscLicense','Get-SscvRALicense','Get-SscMinionKey','Set-SscMinionKey',
'Remove-SscMinionKeyState') 'Remove-SscMinionKey')
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
CmdletsToExport = @() CmdletsToExport = @()

View File

@@ -515,7 +515,7 @@ Function Get-SscvRALicense {
Get-SscData license get_vra_license Get-SscData license get_vra_license
} }
Function Get-SscMinionKeyState { Function Get-SscMinionKey {
<# <#
.NOTES .NOTES
=========================================================================== ===========================================================================
@@ -545,7 +545,7 @@ Function Get-SscMinionKeyState {
} }
Function Set-SscMinionKeyState { Function Set-SscMinionKey {
<# <#
.NOTES .NOTES
=========================================================================== ===========================================================================
@@ -567,7 +567,8 @@ Function Set-SscMinionKeyState {
param( param(
[Parameter(Mandatory=$true, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)][string]$master, [Parameter(Mandatory=$true, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)][string]$master,
[Parameter(Mandatory=$true, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)][string]$minion, [Parameter(Mandatory=$true, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)][string]$minion,
[Parameter(Mandatory=$true)][ValidateSet('accept','reject')][string]$state [Parameter(Mandatory, ParameterSetName='accept')][switch]$accept,
[Parameter(Mandatory, ParameterSetName='reject')][switch]$reject
) )
begin { begin {
@@ -575,6 +576,9 @@ Function Set-SscMinionKeyState {
} }
process { process {
if ($PSCmdlet.ParameterSetName -eq 'accept') { $state = 'accept'}
if ($PSCmdlet.ParameterSetName -eq 'reject') { $state = 'reject'}
if ($PSCmdlet.ShouldProcess("$master : $minion" , $state)) { if ($PSCmdlet.ShouldProcess("$master : $minion" , $state)) {
$collection += ,@($master, $minion) $collection += ,@($master, $minion)
} }
@@ -592,7 +596,7 @@ Function Set-SscMinionKeyState {
} }
} }
Function Remove-SscMinionKeyState { Function Remove-SscMinionKey {
<# <#
.NOTES .NOTES
=========================================================================== ===========================================================================