Skip to content

Commit 894ff3a

Browse files
committed
Improved Set-SgwSnmp parameter handling and help
1 parent bf79afe commit 894ff3a

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

src/StorageGRID-Webscale.psm1

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14799,7 +14799,7 @@ function Global:Get-SgwSnmp {
1479914799
.PARAMETER authtrapenable
1480014800
1 - enable SNMP authentication traps, 2 - disable SNMP authentication traps (default)
1480114801
.PARAMETER TrapDestinations
14802-
List of SNMP trap destinations for V1, V2C, and Inform notifications. Need to include type nad host, may include community and port.
14802+
List of SNMP trap destinations for V1, V2C, and Inform notifications. Need to include type nad host, may include community and port. Example: @{type='trapsink'; host='172.16.10.100'; community='public'; port=162}
1480314803
#>
1480414804
function Global:Set-SgwSnmp {
1480514805
[CmdletBinding()]
@@ -14813,25 +14813,32 @@ function Global:Set-SgwSnmp {
1481314813
HelpMessage = "StorageGRID profile to use for connection.")][Alias("Profile")][String]$ProfileName,
1481414814
[parameter(Mandatory = $False,
1481514815
Position = 2,
14816+
ValueFromPipelineByPropertyName = $True,
1481614817
HelpMessage = "IPv4 SNMP community")][String]$rocommunity,
1481714818
[parameter(Mandatory = $False,
1481814819
Position = 3,
14820+
ValueFromPipelineByPropertyName = $True,
1481914821
HelpMessage = "IPv6 SNMP community")][String]$rocommunity6,
1482014822
[parameter(Mandatory = $False,
1482114823
Position = 4,
14824+
ValueFromPipelineByPropertyName = $True,
1482214825
HelpMessage = "SNMP system location")][String]$sysLocation,
1482314826
[parameter(Mandatory = $False,
1482414827
Position = 5,
14828+
ValueFromPipelineByPropertyName = $True,
1482514829
HelpMessage = "SNMP system location")][String]$sysContact,
1482614830
[parameter(Mandatory = $False,
1482714831
Position = 6,
14832+
ValueFromPipelineByPropertyName = $True,
1482814833
HelpMessage = "default trap community")][String]$trapcommunity,
1482914834
[parameter(Mandatory = $False,
1483014835
Position = 7,
14836+
ValueFromPipelineByPropertyName = $True,
1483114837
HelpMessage = "1 - enable SNMP authentication traps, 2 - disable SNMP authentication traps (default)")][ValidateRange(1,2)][String]$authtrapenable,
1483214838
[parameter(Mandatory = $False,
1483314839
Position = 8,
14834-
HelpMessage = "List of SNMP trap destinations for V1, V2C, and Inform notifications. Object needs to include type nad host, may include community and port.")][Object[]]$TrapDestinations
14840+
ValueFromPipelineByPropertyName = $True,
14841+
HelpMessage = "List of SNMP trap destinations for V1, V2C, and Inform notifications. Object needs to include type nad host, may include community and port. Example: @{type='trapsink'; host='172.16.10.100'; community='public'; port=162}")][Alias("trap_destinations")][PSCustomObject[]]$TrapDestinations
1483514842
)
1483614843

1483714844
Begin {

0 commit comments

Comments
 (0)