def get_community_names():
 ret = dict()
 current_values = __salt__['reg.list_values'](_HKEY, _COMMUNITIES_KEY, include_default=False)
 for current_value in current_values:
  permissions = str()
  for permission_name in _PERMISSION_TYPES:
   if (current_value['vdata'] == _PERMISSION_TYPES[permission_name]):
    permissions = permission_name
    break
  ret[current_value['vname']] = permissions
 if (not ret):
  _LOG.debug('Unable to find existing communities.')
 return ret

def get_community_names ( ) : ret = dict ( ) current_values = __salt__ [ 'reg.list_values' ] ( _HKEY , _COMMUNITIES_KEY , include_default = False ) for current_value in current_values : permissions = str ( ) for permission_name in _PERMISSION_TYPES : if ( current_value [ 'vdata' ] == _PERMISSION_TYPES [ permission_name ] ) : permissions = permission_name break ret [ current_value [ 'vname' ] ] = permissions if ( not ret ) : _LOG . debug ( 'Unable to find existing communities.' ) return ret
get the current accepted snmp community names and their permissions .