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)
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
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]))
def execute(self, ns, group): group = account.get_group(ns, group) account.delete_group(ns, group)