f5-ansible
f5-ansible copied to clipboard
Existing SNMP Configuration Lookups
Is your feature request related to a problem? Please describe.
If the SNMP configuration changes and there is a conflict with the existing configuration (name = community_1 ip=ip2, change to name=community_2) the conflicting entry will cause a failure of the bigip_snmp_trap or bigip_snmp_community modules.
Describe the solution you'd like
Utilize the API endpoints for viewing existing SNMP traps, communities, and global configuration to provide information with the bigip_device_info that can be referenced to remove configuration prior to pushing new configuration
Describe alternatives you've considered
Currently, I am utilizing the bigip_command module to delete all trap destinations and community configurations before reconfiguring the trap destinations and community strings.
Additional context
Existing API endpoints available to retrieve the information:
mgmt/tm/sys/snmp/traps
- return['items']
- Interested in the name, host, network, port, and version fields in the items returned
mgmt/tm/sys/snmp/communities
- return['items']
- Interested in the name, access, community name, oidSubsets and source fields in the items