Skip to content

Commit a92bbb0

Browse files
committed
Throw error for SNMP Cmdlets if StorageGRID is not running 11.2 or later
1 parent 7f2661a commit a92bbb0

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/StorageGRID-Webscale.psm1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14749,6 +14749,9 @@ function Global:Get-SgwSnmp {
1474914749
if (!$Server) {
1475014750
Throw "No StorageGRID admin node management server found. Please run Connect-SgwServer to continue."
1475114751
}
14752+
if ($Server.APIVersion -lt 3.0) {
14753+
Throw "SNMP API is only Supported from StorageGRID 11.2"
14754+
}
1475214755
}
1475314756

1475414757
Process {
@@ -14843,6 +14846,9 @@ function Global:Set-SgwSnmp {
1484314846
if (!$Server) {
1484414847
Throw "No StorageGRID admin node management server found. Please run Connect-SgwServer to continue."
1484514848
}
14849+
if ($Server.APIVersion -lt 3.0) {
14850+
Throw "SNMP API is only Supported from StorageGRID 11.2"
14851+
}
1484614852
}
1484714853

1484814854
Process {

0 commit comments

Comments
 (0)