def present(name, auth=None, **kwargs):
    '''
    Ensure a security group exists.

    You can supply either project_name or project_id.

    Creating a default security group will not show up as a change;
    it gets created through the lookup process.

    name
        Name of the security group

    description
        Description of the security group

    project_name
        Name of Project

    project_id
        ID of Project

    '''
    ret = {'name': name,
           'changes': {},
           'result': True,
           'comment': ''}

    kwargs = __utils__['args.clean_kwargs'](**kwargs)

    __salt__['neutronng.setup_clouds'](auth)

    if 'project_name' in kwargs:
        kwargs['project_id'] = kwargs['project_name']
        del kwargs['project_name']

    project = __salt__['keystoneng.project_get'](
        name=kwargs['project_id'])

    if project is None:
        ret['result'] = False
        ret['comment'] = "project does not exist"
        return ret

    secgroup = __salt__['neutronng.security_group_get'](
        name=name, filters={'tenant_id': project.id})

    if secgroup is None:
        if __opts__['test'] is True:
            ret['result'] = None
            ret['changes'] = kwargs
            ret['comment'] = 'Security Group will be created.'
            return ret

        secgroup = __salt__['neutronng.security_group_create'](**kwargs)
        ret['changes'] = secgroup
        ret['comment'] = 'Created security group'
        return ret

    changes = __salt__['neutronng.compare_changes'](secgroup, **kwargs)
    if changes:
        if __opts__['test'] is True:
            ret['result'] = None
            ret['changes'] = changes
            ret['comment'] = 'Security Group will be updated.'
            return ret

        __salt__['neutronng.security_group_update'](secgroup=secgroup, **changes)
        ret['changes'].update(changes)
        ret['comment'] = 'Updated security group'

    return ret
Ensure a security group exists.

    You can supply either project_name or project_id.

    Creating a default security group will not show up as a change;
    it gets created through the lookup process.

    name
        Name of the security group

    description
        Description of the security group

    project_name
        Name of Project

    project_id
        ID of Project