def list(self, arg, opts):
        groups = pickle.loads(self.pb['router'].perspective_group_get_all())
        counter = 0

        if (len(groups)) > 0:
            self.protocol.sendData("#%s" % 'Group id'.ljust(16), prompt=False)
            for group in groups:
                counter += 1
                group_prefix = ''
                if not group.enabled:
                    group_prefix = '!'
                self.protocol.sendData("#%s" % (str(group_prefix+group.gid).ljust(16)), prompt=False)
                self.protocol.sendData(prompt=False)

        self.protocol.sendData('Total Groups: %s' % counter)
dataset/ETHPy150Open jookies/jasmin/jasmin/protocols/cli/groupsm.py/GroupsManager.list/original