mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Move _get_all_groups up to the top
This commit is contained in:
parent
7a3ff9387d
commit
b0caec320e
1 changed files with 9 additions and 9 deletions
|
@ -48,6 +48,15 @@ def _get_group_object(name):
|
|||
return nt.GetObject('', 'WinNT://./' + name + ',group')
|
||||
|
||||
|
||||
def _get_all_groups():
|
||||
pythoncom.CoInitialize()
|
||||
nt = win32com.client.Dispatch('AdsNameSpaces')
|
||||
|
||||
results = nt.GetObject('', 'WinNT://.')
|
||||
results.Filter = ['group']
|
||||
return results
|
||||
|
||||
|
||||
def _get_username(member):
|
||||
'''
|
||||
Resolve the username from the member object returned from a group query
|
||||
|
@ -427,15 +436,6 @@ def members(name, members_list, **kwargs):
|
|||
return ret
|
||||
|
||||
|
||||
def _get_all_groups():
|
||||
pythoncom.CoInitialize()
|
||||
nt = win32com.client.Dispatch('AdsNameSpaces')
|
||||
|
||||
results = nt.GetObject('', 'WinNT://.')
|
||||
results.Filter = ['group']
|
||||
return results
|
||||
|
||||
|
||||
def list_groups(refresh=False):
|
||||
'''
|
||||
Return a list of groups
|
||||
|
|
Loading…
Add table
Reference in a new issue