[ZBX-19710] API: SNMP interface "version" default not set properly Created: 2021 Jul 21 Updated: 2024 Apr 10 Resolved: 2021 Oct 17 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Documentation (D) |
Affects Version/s: | 5.0.14, 5.4.2 |
Fix Version/s: | 5.0.17rc1, 5.4.6rc1, 6.0.0alpha4, 6.0 (plan) |
Type: | Documentation task | Priority: | Minor |
Reporter: | Sergey Simonenko (Inactive) | Assignee: | Valdis Murzins |
Resolution: | Fixed | Votes: | 0 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Issue Links: |
|
||||
Team: | |||||
Sprint: | Sprint 80 (Sep 2021), Sprint 81 (Oct 2021) | ||||
Story Points: | 0.125 |
Description |
According to the documentation, version key should have a default value of 2 (SNMPv2c):
However making an API call with version key unset results in "Incorrect arguments passed to function". /** * Check if SNMP version is valid. Valid versions: SNMP_V1, SNMP_V2C, SNMP_V3. * * @param array $interface * * @throws APIException if "version" value is incorrect. */ protected function checkSnmpVersion(array $interface) { if (!array_key_exists('version', $interface['details']) || !in_array($interface['details']['version'], [SNMP_V1, SNMP_V2C, SNMP_V3])) { self::exception(ZBX_API_ERROR_PARAMETERS, _('Incorrect arguments passed to function.')); } } |
Comments |
Comment by Ivo Kurzemnieks [ 2021 Oct 01 ] |
Documentation updated: |