Return information about a group

    CLI Example:

    .. code-block:: bash

        salt '*' group.info foo
16628
def info(name):
    '''
    
    '''
    if salt.utils.stringutils.contains_whitespace(name):
        raise SaltInvocationError('Group name cannot contain whitespace')
    try:
        # getgrnam seems to cache weirdly, so don't use it
        grinfo = next(iter(x for x in grp.getgrall() if x.gr_name == name))
    except StopIteration:
        return {}
    else:
        return _format_info(grinfo)
498695
def _format_info(data):
    '''
    
    '''
    return {'name': data.gr_name,
            'gid': data.gr_gid,
            'passwd': data.gr_passwd,
            'members': data.gr_mem}
113267
def info(device):
    '''
    
    '''
    out = __salt__['cmd.run_all']("btrfs filesystem show {0}".format(device))
    salt.utils.fsutils._verify_run(out)

    return _parse_btrfs_info(out['stdout'])
680695
def chgid(name, gid):
    '''
    
    '''
    pre_gid = __salt__['file.group_to_gid'](name)
    if gid == pre_gid:
        return True
    cmd = 'groupmod -g {0} {1}'.format(gid, name)
    __salt__['cmd.run'](cmd, python_shell=False)
    post_gid = __salt__['file.group_to_gid'](name)
    if post_gid != pre_gid:
        return post_gid == gid
    return False
626472
def get_group_details(self, group):
        
        result = {}
        try:
            lgroup = self._get_group(group.name)
            lgroup = preload(lgroup, database=self._database)
        except ObjectDoesNotExist:
            return result

        for i, j in lgroup.items():
            if j is not None:
                result[i] = j

        return result
73724
def dirinfo(path, opts=None):
    '''
    
    '''
    cmd = 'mfsdirinfo'
    ret = {}
    if opts:
        cmd += ' -' + opts
    cmd += ' ' + path
    out = __salt__['cmd.run_all'](cmd, python_shell=False)

    output = out['stdout'].splitlines()
    for line in output:
        if not line:
            continue
        comps = line.split(':')
        ret[comps[0].strip()] = comps[1].strip()
    return ret
1297255
def get_group(self, group_id):
        
        def process_result(result):
            return Group(self, result)

        return Command('get', [ROOT_GROUPS, group_id],
                       process_result=process_result)
582722
def _chattrib(name, key, value, param, root=None):
    '''
    
    '''
    pre_info = info(name, root=root)
    if not pre_info:
        return False

    if value == pre_info[key]:
        return True

    cmd = ['groupmod']

    if root is not None:
        cmd.extend(('-R', root))

    cmd.extend((param, value, name))

    __salt__['cmd.run'](cmd, python_shell=False)
    return info(name, root=root).get(key) == value
1313084
def cli_info(self, event):
        """"""

        self.log('Instance:', self.instance,
                 'Dev:', self.development,
                 'Host:', self.host,
                 'Port:', self.port,
                 'Insecure:', self.insecure,
                 'Frontend:', self.frontendtarget)
208730
def info(name, root=None):
    '''
    
    '''
    if root is not None:
        getspnam = functools.partial(_getspnam, root=root)
    else:
        getspnam = functools.partial(spwd.getspnam)

    try:
        data = getspnam(name)
        ret = {
            'name': data.sp_namp if hasattr(data, 'sp_namp') else data.sp_nam,
            'passwd': data.sp_pwdp if hasattr(data, 'sp_pwdp') else data.sp_pwd,
            'lstchg': data.sp_lstchg,
            'min': data.sp_min,
            'max': data.sp_max,
            'warn': data.sp_warn,
            'inact': data.sp_inact,
            'expire': data.sp_expire}
    except KeyError:
        return {
            'name': '',
            'passwd': '',
            'lstchg': '',
            'min': '',
            'max': '',
            'warn': '',
            'inact': '',
            'expire': ''}
    return ret
962900
def get_group_dns(self):
        
        if self._group_dns is None:
            group_infos = self._get_group_infos()
            self._group_dns = set(group_info[0] for group_info in group_infos)

        return self._group_dns
746354
def get_info(cls):
        
        return '\n'.join(
            [str(cls._instances[key]) for key in cls._instances]
        )
439907
def info(host=None, port=None, db=None, password=None):
    '''
    
    '''
    server = _connect(host, port, db, password)
    return server.info()
709138
def parse_group(cls, group, lines, dist=None):
        """"""
        if not MODULE(group):
            raise ValueError("Invalid group name", group)
        this = {}
        for line in yield_lines(lines):
            ep = cls.parse(line, dist)
            if ep.name in this:
                raise ValueError("Duplicate entry point", group, ep.name)
            this[ep.name] = ep
        return this
449350
def info(args):
    "  "

    site = find_site(args.PATH)
    print_header("%s -- install information" % site.get_name())
    LOGGER.debug(site.get_info(full=True))
    return True
550600
def group_search(auth=None, **kwargs):
    '''
    
    '''
    cloud = get_operator_cloud(auth)
    kwargs = _clean_kwargs(**kwargs)
    return cloud.search_groups(**kwargs)
831678
def cli(ctx, group_id, new_name):
    
    return ctx.gi.groups.update_group(group_id, new_name)