Skip to content

Commit

Permalink
Sync bitbucket and GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
carchi8py committed Nov 16, 2023
1 parent 3711c73 commit da189e8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ The following modules do not have REST equivalent APIs. They will stop working o
### Bug Fixes
- na_ontap_vserver_peer - fix issue with peering multiple clusters with same vserver name in REST.
- na_ontap_ems_destination - fix field error with `certificate.name` for ONTAP 9.11.1 or later in REST.
- na_ontap_snmp - fix for getting error when `authentication_method` set to default with ZAPI.

## 22.8.1

Expand Down
5 changes: 4 additions & 1 deletion changelogs/fragments/DEVOPS-6413.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
minor_changes:
- na_ontap_snmp - added REST support for snmpv3 user.
- na_ontap_snmp - added REST support for snmpv3 user.

bugfixes:
- na_ontap_snmp - fix for getting error when `authentication_method` set to default with ZAPI.
9 changes: 4 additions & 5 deletions plugins/modules/na_ontap_snmp.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@
choices: ['community', 'usm', 'both']
description:
- Authentication method for SNMP user.
- Only supported with REST.
default: 'community'
- Only supported with REST. The default value is community.
type: str
version_added: 22.8.0
snmpv3:
Expand Down Expand Up @@ -164,8 +163,7 @@ def __init__(self):
state=dict(required=False, type='str', choices=['present', 'absent'], default='present'),
snmp_username=dict(required=True, type='str'),
access_control=dict(required=False, type='str', choices=['ro'], default='ro'),
authentication_method=dict(required=False, type='str',
choices=['community', 'usm', 'both'], default='community'),
authentication_method=dict(required=False, type='str', choices=['community', 'usm', 'both']),
snmpv3=dict(required=False, type='dict',
options=dict(
authentication_password=dict(required=True, type='str', no_log=True),
Expand Down Expand Up @@ -203,7 +201,7 @@ def __init__(self):
for unsupported_zapi_property in self.unsupported_zapi_properties:
if self.parameters.get(unsupported_zapi_property) is not None:
msg = "Error: %s option is not supported with ZAPI. It can only be used with REST." % unsupported_zapi_property
self.module.fail_json(msg=msg)
self.module.fail_json(msg=msg)
self.server = netapp_utils.setup_na_ontap_zapi(module=self.module)

def invoke_snmp_community(self, zapi):
Expand Down Expand Up @@ -272,6 +270,7 @@ def add_snmp_user(self):

def add_snmp_rest(self):
api = 'support/snmp/users'
self.parameters['authentication_method'] = self.parameters.get('authentication_method', 'community')
body = {
'name': self.parameters['snmp_username'],
'authentication_method': self.parameters['authentication_method']
Expand Down

0 comments on commit da189e8

Please sign in to comment.