Ensure domain exists and is up-to-date

    name
        Name of the domain

    domain
        The name or id of the domain

    enabled
        Boolean to control if domain is enabled

    description
        An arbitrary description of the domain

    password
        The user password

    email
        The users email address

def present(name, auth=None, **kwargs):
    '''
    Ensure domain exists and is up-to-date

    name
        Name of the domain

    domain
        The name or id of the domain

    enabled
        Boolean to control if domain is enabled

    description
        An arbitrary description of the domain

    password
        The user password

    email
        The users email address
    '''
    ret = {'name': name,
           'changes': {},
           'result': True,
           'comment': ''}

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

    __salt__['keystoneng.setup_clouds'](auth)

    kwargs['name'] = name
    user = _common(kwargs)

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

        user = __salt__['keystoneng.user_create'](**kwargs)
        ret['changes'] = user
        ret['comment'] = 'Created user'
        return ret

    changes = __salt__['keystoneng.compare_changes'](user, **kwargs)
    if changes:
        if __opts__['test'] is True:
            ret['result'] = None
            ret['changes'] = changes
            ret['comment'] = 'User will be updated.'
            return ret

        kwargs['name'] = user
        __salt__['keystoneng.user_update'](**kwargs)
        ret['changes'].update(changes)
        ret['comment'] = 'Updated user'

    return ret