mirror of
https://github.com/xcat2/confluent.git
synced 2026-09-29 00:31:09 +00:00
Prioritize community if set
If the community is set, ignore user/password. This fits expectations a bit more.
This commit is contained in:
@@ -337,14 +337,14 @@ def _full_updatemacmap(configmanager):
|
||||
if not switch:
|
||||
continue
|
||||
switchparms = switchcfg.get(switch, {})
|
||||
snmpc = switchparms.get(
|
||||
'secret.snmpcommunity', {}).get('value', 'public')
|
||||
password = switchparms.get(
|
||||
'secret.hardwaremanagementpassword', {}).get('value', None)
|
||||
'secret.snmpcommunity', {}).get('value', None)
|
||||
if not password:
|
||||
password = snmpc
|
||||
user = switchparms.get(
|
||||
'secret.hardwaremanagementuser', {}).get('value', None)
|
||||
password = switchparms.get(
|
||||
'secret.hardwaremanagementpassword', {}).get('value',
|
||||
'public')
|
||||
user = switchparms.get(
|
||||
'secret.hardwaremanagementuser', {}).get('value', None)
|
||||
switchauth.append((switch, password, user))
|
||||
pool = GreenPool()
|
||||
for ans in pool.imap(_map_switch, switchauth):
|
||||
|
||||
Reference in New Issue
Block a user