Sets a CIMC user with specified configurations.

    .. versionadded:: 2019.2.0

    Args:
        uid(int): The user ID slot to create the user account in.

        username(str): The name of the user.

        password(str): The clear text password of the user.

        priv(str): The privilege level of the user.

        status(str): The account status of the user.

    CLI Example:

    .. code-block:: bash

        salt '*' cimc.set_user 11 username=admin password=foobar priv=admin active

def set_user(uid=None, username=None, password=None, priv=None, status=None):
    '''
    Sets a CIMC user with specified configurations.

    .. versionadded:: 2019.2.0

    Args:
        uid(int): The user ID slot to create the user account in.

        username(str): The name of the user.

        password(str): The clear text password of the user.

        priv(str): The privilege level of the user.

        status(str): The account status of the user.

    CLI Example:

    .. code-block:: bash

        salt '*' cimc.set_user 11 username=admin password=foobar priv=admin active

    '''

    conf = ""
    if not uid:
        raise salt.exceptions.CommandExecutionError("The user ID must be specified.")

    if status:
        conf += ' accountStatus="{0}"'.format(status)

    if username:
        conf += ' name="{0}"'.format(username)

    if priv:
        conf += ' priv="{0}"'.format(priv)

    if password:
        conf += ' pwd="{0}"'.format(password)

    dn = "sys/user-ext/user-{0}".format(uid)

    inconfig = """<aaaUser id="{0}"{1} dn="sys/user-ext/user-{0}"/>""".format(uid,
                                                                               conf)

    ret = __proxy__['cimc.set_config_modify'](dn, inconfig, False)

    return ret