def create_user(name, password, *privileges):
    _priv = ['ADMIN_PRIV',
             'REMOTE_CONS_PRIV',
             'RESET_SERVER_PRIV',
             'VIRTUAL_MEDIA_PRIV',
             'CONFIG_ILO_PRIV']

    _xml = """<RIBCL version="2.2">
                <LOGIN USER_LOGIN="x" PASSWORD="y">
                  <RIB_INFO mode="write">
                    <MOD_GLOBAL_SETTINGS>
                      <MIN_PASSWORD VALUE="7"/>
                    </MOD_GLOBAL_SETTINGS>
                  </RIB_INFO>

                 <USER_INFO MODE="write">
                   <ADD_USER USER_NAME="{0}" USER_LOGIN="{0}" PASSWORD="{1}">
                     {2}
                   </ADD_USER>
                 </USER_INFO>
               </LOGIN>
             </RIBCL>""".format(name, password, '\n'.join(['<{0} value="Y" />'.format(i.upper()) for i in privileges if i.upper() in _priv]))

    return __execute_cmd('Create_user', _xml)
Control whether assertions are generated.
dataset/ETHPy150Open saltstack/salt/salt/modules/ilo.py/create_user--crossover with--dataset/ETHPy150Open goFrendiAsgard/kokoropy/kokoropy/packages/sqlalchemy/orm/query.py/Query.enable_assertions