TWSD-1392 - SNMP: WebUI is configuring parameters incorrectly and not aligning with CLI behavior, resulting in configuration mismatches.

Review Request #1213 — Created Dec. 8, 2025 and submitted

shuinvy
APV10
rel_apv_10_7
TWSD-1392
austin, kevin.poh, mingji, peteryeh, weikai

Enhancement for user can update SNMP config

The ticket link:
https://arraynetworks.atlassian.net/browse/TWSD-1392

The changes for C file is for let password is original if user set password as '*'.
1. You can check logic for C code in the attachment: Flowchart for C code.
2. Define constant variable MASK_PASSWORD ('
*')
3. Add variable for check if auth_password is MASK_PASSWORD
4. If auth_password is MASK_PASSWORD, then set use_existing_auth_pw = 1 else original logic.
5. If priv_password is MASK_PASSWORD, then set encry_priv_passwd = pInfo->host[i].privPassword and decrypt pInfo->host[i].privPassword to decrypt_priv_passwd
6. Set priv_password = decrypt_priv_passwd;
7. If use_existing_auth_pw = 1(auth_password is MASK_PASSWORD), then set encry_auth_passwd = pInfo->host[i].authPassword and decrypt pInfo->host[i].authPassword to decrypt_auth_passwd;
8. Set auth_password = decrypt_auth_passwd;

The changes for Python file is for let SNMP auth can be editable (Can be updated)
1. Remove port for Server class, so port field will be different from Version1or2 and Version 3. Only Version 3 can edit Host Port field.
2. Set some fields to be editable: Host Port, Engine ID, Security Level, Authentication Password, Authentication Protocol, Private Password, Private Password Protocol (You can check attachment for WebUI, Editable fields)
3. Add function for updating SNMP auth part, update_by_version.
4. While you use CLI snmp host, it will create default information of SNMP auth. So we always call snmp auth to update authentication of SNMP. We call update_by_version when adding SNMP Trap Server and updating Version 3 data.
5. Add function for updating in Version 3 Server.
6. In update_by_version, if there is no data, it will create data by instance.get_field_dict()
7. Besides, the priv_password removed optional=True to let this field be mandatory.


shuinvy
shuinvy
mingji
  1. Ship It!
  2. 
      
peteryeh
  1. Ship It!
  2. 
      
austin
  1. Ship It!
  2. 
      
shuinvy
Review request changed

Status: Closed (submitted)

Loading...