2
0
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:
Jarrod Johnson
2017-05-25 15:02:08 -04:00
parent 77bce756cd
commit 9eacb4e3f0
@@ -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):