Пример #1
0
 def execute(self, ns, group, users):
     group_inst = account.get_group(ns, group)
     user_insts = []
     for user in users:
         user_inst = account.get_user(ns, user)
         user_insts.append(user_inst)
     account.remove_from_group(ns, group_inst, user_insts)
Пример #2
0
 def execute(self, ns, group, users):
     group_inst = account.get_group(ns, group)
     user_insts = []
     for user in users:
         user_inst = account.get_user(ns, user)
         user_insts.append(user_inst)
     account.remove_from_group(ns, group_inst, user_insts)
Пример #3
0
 def execute(self, ns, groups):
     if groups:
         for group in groups:
             inst = account.get_group(ns, group)
             yield inst
     else:
         for group in account.list_groups(ns):
             yield group
Пример #4
0
 def execute(self, ns, groups):
     if groups:
         for group in groups:
             inst = account.get_group(ns, group)
             yield inst
     else:
         for group in account.list_groups(ns):
             yield group
Пример #5
0
    def execute(self, ns, groups):
        if not groups:
            group_insts = account.list_groups(ns)
        else:
            group_insts = []
            for group in groups:
                group_insts.append(account.get_group(ns, group))

        for group in group_insts:
            users = account.get_users_in_group(ns, group)
            yield (group.Name, ', '.join([user.Name for user in users]))
Пример #6
0
    def execute(self, ns, groups):
        if not groups:
            group_insts = account.list_groups(ns)
        else:
            group_insts = []
            for group in groups:
                group_insts.append(account.get_group(ns, group))

        for group in group_insts:
            users = account.get_users_in_group(ns, group)
            yield (group.Name, ', '.join([user.Name for user in users]))
Пример #7
0
 def execute(self, ns, group):
     group = account.get_group(ns, group)
     account.delete_group(ns, group)
Пример #8
0
 def execute(self, ns, group):
     group = account.get_group(ns, group)
     account.delete_group(ns, group)