Skip to content

Add SNMP family resource modules (v10.16)#77

Open
ed6869 wants to merge 2 commits into
aruba:masterfrom
ed6869:feature/snmp
Open

Add SNMP family resource modules (v10.16)#77
ed6869 wants to merge 2 commits into
aruba:masterfrom
ed6869:feature/snmp

Conversation

@ed6869

@ed6869 ed6869 commented Jun 29, 2026

Copy link
Copy Markdown

Summary

Add the SNMP family of resource modules so the AOS-CX Ansible collection
can manage SNMP through pyaoscx.

New modules (registered in pyaoscx/api.py):

  • Snmpv3User (system/snmpv3_users) — full CRUD, with auth/priv
    protocols and pass phrases, access level, remote engine ID, view link.
  • SnmpCommunity (system/snmp_community_attributes) — CRUD, optional
    view link.
  • SnmpView (system/snmp_views) — CRUD.
  • SnmpViewEntry (.../snmp_view_entry) — server-generated UUID index,
    create/delete only (entries are immutable).
  • SnmpTrap (system/snmp_traps) — compound index
    (vrf, receiver_address, receiver_udp_port, type, version), create/delete.

Adds the v10.16 REST mapping required by the SNMP endpoints.

Testing

  • Offline unit tests (tests/test_snmp.py) — mocked session, 6 passing.
  • Live lifecycle (create + idempotency + delete) on a CX6300 FL.10.17
    switch via the companion collection modules.

Companion collection PR

Companion collection PR: aruba/aoscx-ansible-collection#160

Fixes #79

Add Snmpv3User, SnmpCommunity, SnmpView, SnmpViewEntry and SnmpTrap
modules for system/snmpv3_users, snmp_community_attributes, snmp_views
(with immutable view entries) and snmp_traps (compound index). Register
them in api.py and add the v10.16 REST mapping. Includes offline tests.

Signed-off-by: ed6869 <ed6869@mail.com>
Some firmware returns the snmp_view_entry attributes inline instead of a
reference map; parse both shapes so enumeration does not crash and view
entries stay idempotent.

Signed-off-by: ed6869 <ed6869@mail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add SNMP family resource modules (v3 user, community, view, trap)

1 participant